jj/lib
Yuya Nishihara 9832ee205d index: optimize heads_pos() to cache generation numbers during computation
Apparently, IndexEntry::generation_number() isn't cheap probably because it
involves random access to larger memory region, and the u32 value might not
be aligned. Let's instead store the generation numbers in BinaryHeap.

Also, heads_pos() becomes slightly faster by keeping the BinaryHeap entries
small, so I've removed the IndexEntry at all.

This makes the default log and disambiguation revsets fast, which evaluate
'heads(immutable_heads())'.

"bench revset" result in my linux repo:

    revsets/heads(tags())
    ---------------------
    baseline  3.28     560.6±4.01ms
    1         2.92     500.0±2.99ms
    2 (this)  1.98     339.6±1.64ms
2023-11-16 08:27:59 +09:00
..
benches cargo: rename crates from jujutsu/jujutsu-lib to jj-cli/jj-lib 2023-07-09 06:40:43 +02:00
gen-protos Use { workspace = true } to appease VS Code's Cargo.toml parser 2023-08-22 21:38:53 -07:00
src index: optimize heads_pos() to cache generation numbers during computation 2023-11-16 08:27:59 +09:00
tests git: have import_refs() obtain git2::Repository instance from store 2023-11-14 17:35:27 +09:00
testutils sign: Implement storage for digital commit signatures 2023-11-12 03:37:13 +02:00
Cargo.toml tree: remove unsafe with ouroboros for self-referential iterators 2023-11-09 21:50:29 -08:00
LICENSE cargo: add LICENSE file to each crate we publish 2023-09-22 21:48:28 -07:00