-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged_tree: do not re-look up non-conflicting tree values by name
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 .. ```
- Loading branch information
Showing
1 changed file
with
32 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters