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

dumps/serialize_to_writer: insert BufWriter to speed up serialization #554

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lschuermann
Copy link

By buffering bincode's output prior to compression, we can achieve a ~30x speedup of syntect in debug builds (such as used in cargo tests by default) on a single SyntaxSetBuilder::build() call. For Tock's license-checker 1 crate using syntect, this brings overall test times down from ~75s to 4s on an i7-1360P. This change does not affect release builds much, bringing an individual test down from 0.17 to 0.13 seconds.

By buffering bincode's output prior to compression, we can achieve a
~30x speedup of syntect in debug builds (such as used in `cargo test`s
by default) on a single `SyntaxSetBuilder::build()` call. For Tock's
`license-checker` [1] crate using `syntect`, this brings overall test
times down from ~75s to 4s on an i7-1360P. This change does not affect
release builds much, bringing an individual test down from 0.17 to
0.13 seconds.

[1]: https://github.com/tock/tock/tree/a109dd65fb269479ca4fa020af0a54da740eca28/tools/license-checker
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.

2 participants