-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revset_graph: detach CompositeIndex, reimplement as RevWalk
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 '' ```
- Loading branch information
Showing
4 changed files
with
73 additions
and
68 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
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
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
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