Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dumps/serialize_to_writer: insert BufWriter to speed up serialization
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
- Loading branch information