Closed tomtau closed 4 months ago
The recent changes enhance benchmarking capabilities across the project by integrating the criterion
library, modifying UTF-8 character matching, and refining the handling of dead code warnings. The updates also introduce new benchmarking configurations, utilize project-wide dependencies, and streamline character parsing in the TypedNode
trait, leading to more efficient and maintainable code.
File/Directory | Change Summary |
---|---|
.github/workflows/benchmark.yml |
Modified project name parameter in the benchmarking workflow. |
Cargo.toml |
Added criterion dependency with version 0.5.1 . |
derive/Cargo.toml |
Changed criterion dependency to use criterion.workspace = true . |
pest/Cargo.toml , pest/benches/position.rs |
Added criterion as a dev dependency and introduced a benchmark for the TypedNode trait. |
pest/src/position.rs |
Modified dead code warnings and adjusted logic for the next_char function. |
pest/src/typed/template/mod.rs (existing) |
Introduced UTF-8 character length calculation and constants, adjusted TypedNode trait implementation. |
pest/src/typed/template/mod.rs (new changeset) |
Modified TypedNode trait to use input.match_string with a buffer for UTF-8 character matching. |
In lines of code, where bytes align,
Criterion joins, in numbers we confide,
UTF-8 now matched with care, so fine,
Benchmarks run, our code's new guide.
Dead code sleeps, but still aware,
A rabbit's touch, everywhere.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
criterion
to measure performance, with specific benchmarks added for theTypedNode
trait.Improvements
TypedNode
trait, providing more efficient handling and matching of characters.Chores