Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 17, 2023
Merged

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
15 checks passed
@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