jj/lib
Yuya Nishihara ca6b9828d1 id_prefix: only store first few bytes of keys in IdIndex
This eliminates indirect access through Vec<u8> and improves cache locality
while sorting the index entries. We can achieve a similar result by using
SmallVec<[u8; 24]> in place of Commit/ChangeId(Vec<u8>), but we would have
to determine a reasonable id length across backends. Indexing [u8; 4] performs
better, at the cost of the API and implementation complexity.

For temporary Commit/ChangeId allocation in general, I think a borrowed type
like Path/PathBuf will help.

Testing with my "linux" repo, this saves ~670ms needed to initialize both
change id index and disambiguation indexes.
2023-06-25 12:54:18 +09:00
..
benches benches: group unchanged/modified/reversed-line diffs together 2023-03-27 23:38:56 +09:00
gen-protos backend: split up store.proto in git and local versions 2023-06-22 13:49:46 +02:00
src id_prefix: only store first few bytes of keys in IdIndex 2023-06-25 12:54:18 +09:00
tests Fix jj init --git-repo fails and leaves broken .jj folder 2023-06-20 11:02:06 -07:00
testutils cargo: bump itertools from 0.10.5 to 0.11.0 2023-06-22 18:18:48 +02:00
build.rs lib: replace protobuf crate with prost 2022-12-22 07:04:35 -08:00
Cargo.toml cargo: bump itertools from 0.10.5 to 0.11.0 2023-06-22 18:18:48 +02:00