Skip to content

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

Merged
epage merged 1 commit intowinnow-rs:mainfrom
epage:perf
Aug 17, 2023
Merged

perf(token): Speed up take_until under simd#317
epage merged 1 commit intowinnow-rs:mainfrom
epage:perf

Conversation

@epage
Copy link
Collaborator

@epage epage commented Aug 17, 2023

This reverts commit 489aa2a.

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

This reverts commit 489aa2a.

PR winnow-rs#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 epage merged commit 58bcec1 into winnow-rs:main Aug 17, 2023
@epage epage deleted the perf branch August 17, 2023 20:02
@epage
Copy link
Collaborator Author

epage commented Aug 17, 2023

Important to note that for gitoxide, take_until looks for

  • space
  • newline
  • :
  • >
  • <
  • PGP signature begin
  • PGP signature end

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments