Mercurial > hg
view rust/hg-core/src/operations/mod.rs @ 51229:1b23aaf5eb7b
rust-index: optimize find_gca_candidates() on less than 8 revisions
This is expected to be by far the most common case, given that, e.g.,
merging involves using it on two revisions.
Using a `u8` as support for the bitset obviously divides the amount of
RAM needed by 8. To state the obvious, on a repository with 10 million
changesets, this spares 70MB. It is also possible that it'd be slightly
faster, because it is easier to allocate and provides better cache locality.
It is possible that some exhaustive listing of the traits implemented by
`u8` and `u64` would avoid the added duplication, but that can be done later
and would need a replacement for the `MAX` consts.
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Fri, 20 Oct 2023 09:12:22 +0200 |
parents | ac3859a8b796 |
children | 69b804c8e09e |
line wrap: on
line source
//! A distinction is made between operations and commands. //! An operation is what can be done whereas a command is what is exposed by //! the cli. A single command can use several operations to achieve its goal. mod cat; mod debugdata; mod list_tracked_files; mod status_rev_rev; pub use cat::{cat, CatOutput}; pub use debugdata::{debug_data, DebugDataKind}; pub use list_tracked_files::{list_rev_tracked_files, FilesForRev}; pub use status_rev_rev::{status_rev_rev_no_copies, DiffStatus, StatusRevRev};