winnow-rs / winnow

Making parsing a breeze
https://docs.rs/winnow
Other
572 stars 44 forks source link

perf(token): Speed up `take_until` under simd #317

Closed epage closed 1 year ago

epage commented 1 year ago

This reverts commit 489aa2ace0ce77790cf8d2aa3fc0fcf8a8f7ccb2.

PR #86 "FindSubstring<&[u8]>: make use of memchr::memmem"

When testing under gitoxide, it turned out this slowed down gitoxide-specific micro-benchmarks from ~170ns to ~240ns

epage commented 1 year ago

Important to note that for gitoxide, take_until looks for

So its a mix of single-character (the memchr shortcut) and actual substring search