-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
index: compact parent encoding, inline up to two parents
This saves 4 more bytes per entry, and more importantly, most commit parents can be resolved with no indirection to the overflow table. IIRC, Git always inlines the first parent, but that wouldn't be useful in jj since jj diffs merge commit against the auto-merge parent. The first merge parent is nothing special. I'll use a similar encoding in change id sstable, where only one position will be inlined (to optimize for imported commits.) Benchmark number measuring the cost of change id index building: ``` % hyperfine --sort command --warmup 3 --runs 20 -L bin jj-0,jj-1 \ -s "target/release-with-debug/{bin} -R ~/mirrors/linux \ --ignore-working-copy debug reindex" \ "target/release-with-debug/{bin} -R ~/mirrors/linux \ --ignore-working-copy log -r@ --config-toml='revsets.short-prefixes=\"\"'" Benchmark 1: target/release-with-debug/jj-0 -R ~/mirrors/linux --ignore-working-copy log -r@ --config-toml='revsets.short-prefixes=""' Time (mean ± σ): 342.9 ms ± 14.5 ms [User: 202.4 ms, System: 140.6 ms] Range (min … max): 326.6 ms … 360.6 ms 20 runs Benchmark 2: target/release-with-debug/jj-1 -R ~/mirrors/linux --ignore-working-copy log -r@ --config-toml='revsets.short-prefixes=""' Time (mean ± σ): 325.0 ms ± 13.6 ms [User: 196.2 ms, System: 128.8 ms] Range (min … max): 311.6 ms … 343.2 ms 20 runs Relative speed comparison 1.06 ± 0.06 target/release-with-debug/jj-0 -R ~/mirrors/linux --ignore-working-copy log -r@ --config-toml='revsets.short-prefixes=""' 1.00 target/release-with-debug/jj-1 -R ~/mirrors/linux --ignore-working-copy log -r@ --config-toml='revsets.short-prefixes=""' ```
- Loading branch information
Showing
2 changed files
with
82 additions
and
45 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