mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-19 19:08:08 +00:00
5806dbfd32
For API consistency. It wouldn't practically matter unless we want to reuse .iter_graph() in lazy event-driven GUI context. I don't see significant performance difference: - jj-0: original impl with look-ahead IndexEntry<'_> buffer - jj-1: this patch With dense graph ``` % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1 \ "target/release-with-debug/{bin} -R ~/mirrors/git --ignore-working-copy log -r.. -T ''" Benchmark 1: target/release-with-debug/jj-0 -R ~/mirrors/git --ignore-working-copy log -r.. -T '' Time (mean ± σ): 1.367 s ± 0.008 s [User: 1.261 s, System: 0.105 s] Range (min … max): 1.357 s … 1.380 s 10 runs Benchmark 2: target/release-with-debug/jj-1 -R ~/mirrors/git --ignore-working-copy log -r.. -T '' Time (mean ± σ): 1.344 s ± 0.017 s [User: 1.245 s, System: 0.099 s] Range (min … max): 1.313 s … 1.369 s 10 runs Relative speed comparison 1.02 ± 0.01 target/release-with-debug/jj-0 -R ~/mirrors/git --ignore-working-copy log -r.. -T '' 1.00 target/release-with-debug/jj-1 -R ~/mirrors/git --ignore-working-copy log -r.. -T '' ``` With sparse graph ``` % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1 \ "target/release-with-debug/{bin} -R ~/mirrors/git --ignore-working-copy log -r'tags()' -T ''" Benchmark 1: target/release-with-debug/jj-0 -R ~/mirrors/git --ignore-working-copy log -r'tags()' -T '' Time (mean ± σ): 1.347 s ± 0.017 s [User: 1.216 s, System: 0.130 s] Range (min … max): 1.321 s … 1.379 s 10 runs Benchmark 2: target/release-with-debug/jj-1 -R ~/mirrors/git --ignore-working-copy log -r'tags()' -T '' Time (mean ± σ): 1.379 s ± 0.023 s [User: 1.238 s, System: 0.140 s] Range (min … max): 1.328 s … 1.403 s 10 runs Relative speed comparison 1.00 target/release-with-debug/jj-0 -R ~/mirrors/git --ignore-working-copy log -r'tags()' -T '' 1.02 ± 0.02 target/release-with-debug/jj-1 -R ~/mirrors/git --ignore-working-copy log -r'tags()' -T '' ``` |
||
---|---|---|
.. | ||
examples | ||
src | ||
testing | ||
tests | ||
build.rs | ||
Cargo.toml | ||
LICENSE |