ok/jj
1
0
Fork 0
forked from mirrors/jj
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
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
testutils cargo: bump itertools from 0.10.5 to 0.11.0 2023-06-22 18:18:48 +02:00
build.rs
Cargo.toml cargo: bump itertools from 0.10.5 to 0.11.0 2023-06-22 18:18:48 +02:00