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: Use ByteString for lexer; decode to Text immediately. #80

Merged
merged 1 commit into from
Mar 21, 2022

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Mar 20, 2022

This makes the end-to-end parsing about 2x faster. We can now parse all
of toxcore in 0.45 seconds on my machine.


This change is Reviewable

@iphydf iphydf added this to the 0.0.16 milestone Mar 20, 2022
@auto-add-label auto-add-label bot added the performance A code change that improves performance label Mar 20, 2022
@iphydf iphydf modified the milestones: 0.0.16, 0.0.17 Mar 20, 2022
This makes the end-to-end parsing about 2x faster. We can now parse all
of toxcore in 0.45 seconds on my machine, making it parse around
3.4MiB/s (including TreeParser and CommentParser).

The lexer consumes 0.11s out of those 0.45s, running at around 9.8MiB/s.
Copy link
Member

@robinlinden robinlinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@toktok-releaser toktok-releaser merged commit 54fb59b into TokTok:master Mar 21, 2022
@iphydf iphydf deleted the lex-bytestring branch March 21, 2022 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance A code change that improves performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants