We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I found some small performance issues.
if parol_runtime provide log/release_max_level_off feature like below, Rust compiler can remove trace! macro statically.
parol_runtime
log/release_max_level_off
trace!
[features] max_level_off = ["log/max_level_off"] max_level_error = ["log/max_level_error"] max_level_warn = ["log/max_level_warn"] max_level_info = ["log/max_level_info"] max_level_debug = ["log/max_level_debug"] max_level_trace = ["log/max_level_trace"] release_max_level_off = ["log/release_max_level_off"] release_max_level_error = ["log/release_max_level_error"] release_max_level_warn = ["log/release_max_level_warn"] release_max_level_info = ["log/release_max_level_info"] release_max_level_debug = ["log/release_max_level_debug"] release_max_level_trace = ["log/release_max_level_trace"]
I got 6% performance gain.
throughput/parse time: [11.043 ms 11.056 ms 11.073 ms] thrpt: [1.3537 MiB/s 1.3558 MiB/s 1.3574 MiB/s] change: time: [-7.8789% -5.9537% -4.3499%] (p = 0.00 < 0.05) thrpt: [+4.5478% +6.3307% +8.5528%] Performance has improved. Found 6 outliers among 100 measurements (6.00%) 2 (2.00%) high mild 4 (4.00%) high severe
is_empty
pop
VerylGrammarAuto::pop which is generated by parol has is_empty check. It can be removed because pop will return None when the vec is empty.
VerylGrammarAuto::pop
parol
None
fn pop(&mut self, context: &str) -> Option<ASTType> { //if !self.item_stack.is_empty() { let item = self.item_stack.pop(); if let Some(ref item) = item { trace!("pop {}: {:?}", context, item); } item //} else { // None //} }
I got 2% performance gain.
throughput/parse time: [10.867 ms 10.931 ms 11.023 ms] thrpt: [1.3599 MiB/s 1.3713 MiB/s 1.3793 MiB/s] change: time: [-4.6804% -2.4878% -0.5493%] (p = 0.01 < 0.05) thrpt: [+0.5523% +2.5513% +4.9102%] Change within noise threshold. Found 14 outliers among 100 measurements (14.00%) 5 (5.00%) high mild 9 (9.00%) high severe
The text was updated successfully, but these errors were encountered:
Thanks for your analysis. Both are good points 👍 I will incorporate your suggestions in the next version.
Sorry, something went wrong.
Fix for issue #61
22b2a44
#61: Moved the new features to the right file
f1661db
Fixed with commit f1661db. New versions have not yet been released on crates.io.
No branches or pull requests
I found some small performance issues.
disable log
if
parol_runtime
providelog/release_max_level_off
feature like below, Rust compiler can removetrace!
macro statically.I got 6% performance gain.
remove
is_empty
beforepop
VerylGrammarAuto::pop
which is generated byparol
hasis_empty
check.It can be removed because
pop
will returnNone
when the vec is empty.I got 2% performance gain.
The text was updated successfully, but these errors were encountered: