mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-20 11:25:34 +00:00
2cb7e91dc7
While measuring file(path) query, I noticed BTreeMap lookup appears in perf. It actually has a measurable cost if the history is linear and parent trees don't have to be merged dynamically. For merge-heavy history, the cost of tree merges is more significant. I'll address that separately. ``` % hyperfine --sort command --warmup 3 --runs 50 -L bin jj-1,jj-2 \ 'target/release-with-debug/{bin} -R ~/mirrors/git --ignore-working-copy \ log -r "::trunk() & ~merges() & file(root:builtin)" --no-graph -n100' Benchmark 1: target/release-with-debug/jj-1 .. Time (mean ± σ): 239.7 ms ± 7.1 ms [User: 192.1 ms, System: 46.5 ms] Range (min … max): 222.2 ms … 249.7 ms 50 runs Benchmark 2: target/release-with-debug/jj-2 .. Time (mean ± σ): 201.7 ms ± 6.9 ms [User: 153.7 ms, System: 46.6 ms] Range (min … max): 184.2 ms … 211.1 ms 50 runs Relative speed comparison 1.19 ± 0.05 target/release-with-debug/jj-1 .. 1.00 target/release-with-debug/jj-2 .. ``` |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
proc-macros | ||
src | ||
tests | ||
testutils | ||
Cargo.toml | ||
LICENSE |