Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The initial implementation assumed that PolicyParser::new() was a relatively cheap function time-wise, and called it once per file. There's no need to rebuild it, and it turns out in lalrpop performance discussions that new() can actually be expensive (and possible performance improvements could move work into new() to speed up the steady state). Regardless of the significance, there's no real cost to pulling new() out to call once per file (although it might complicate the API ever so slightly if we later expose parse_policy() as a public function.) The benchmark run is below. The weird thing is that Stress Functions only has one file, so I would expect this to be a no-op for performance there. But that 14% has been pretty reproducible across multiple runs. I'm not really sure what's going on there. Full system compile time: [6.1514 ms 6.2534 ms 6.3622 ms] change: [-79.353% -77.290% -74.995%] (p = 0.00 < 0.05) Performance has improved. Found 5 outliers among 100 measurements (5.00%) 5 (5.00%) high mild Benchmarking Stress functions: Warming up for 3.0000 s Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 10.2s, or reduce sample count to 40. Stress functions time: [99.906 ms 102.88 ms 105.94 ms] change: [-19.498% -13.892% -8.4060%] (p = 0.00 < 0.05) Performance has improved.
- Loading branch information