-
Notifications
You must be signed in to change notification settings - Fork 35
Conversation
944a1a4
to
4e9654d
Compare
d954b74
to
58f6816
Compare
When
|
When BenchmarkDotNet.Core=v0.9.9.0 Type=TrySliceToBenchmark Mode=Throughput Platform=X64
|
The Vector and long paths are slicing per loop, whereas the naive is just iterating an array; so the slice doesn't seem to add too much overhead |
@benaadams Is there a different path taken for |
@KodrAus its the byte by byte iteration that happens at the end to pick up the remaining bytes when the input is not a multiple of vector and the search term has not been found (Match is very last byte in all these tests; so it has to get to the end) E.g. on AVX that can be 31 bytes |
(i.e. this is worse case searching) |
Gotcha 👍 |
Updated with results (benchmark included in Tests.Performance)
/cc @davidfowl