forked from mirrors/jj
c82a62cf99
Since IdIndex is immutable, we don't need fast insertion provided by BTreeMap. Let's simply use Vec for some speed up. More importantly, this allows us to store multiple (ChangeId, CommitId) pairs for the same change id, and will unblock the use of IdIndex in revset::resolve_symbol(). Some benchmark numbers (against my "linux" repo) follow. Command: hyperfine --warmup 3 "jj log -r master \ -T 'commit_id.short_prefix_and_brackets()' \ --no-commit-working-copy --no-graph" Original: Time (mean ± σ): 1.892 s ± 0.031 s [User: 1.800 s, System: 0.092 s] Range (min … max): 1.833 s … 1.935 s 10 runs This commit: Time (mean ± σ): 867.5 ms ± 2.7 ms [User: 809.9 ms, System: 57.7 ms] Range (min … max): 862.3 ms … 871.0 ms 10 runs |
||
---|---|---|
.. | ||
gen-protos | ||
src | ||
tests | ||
testutils | ||
build.rs | ||
Cargo.toml |