-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow inlining standard Parse* trait impls
Trait impl methods need to be marked with #[inline] to allow cross-crate inlining. As many of these functions are trivial, but they are called for every single position of the input, this has major impact: - Performance of the new parse-rosetta-rs JSON parser example I recently contributed ([1]) increases by almost 40% on my machine, making it slightly faster than winnow (and possibly the fastest full-featured parser listed there) - For a simple tokenizer I built for one of my projects, I measured a performance gain of ~94%, almost doubling the throughput! [1] https://github.com/rosetta-rs/parse-rosetta-rs/blob/main/examples/peg-app/parser.rs
- Loading branch information
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters