forked from mirrors/jj
8b1dfa7157
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=""' ``` |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
src | ||
tests | ||
testutils | ||
Cargo.toml | ||
LICENSE |