# HG changeset patch # User Pierre-Yves David # Date 2024-09-12 08:09:06 # Node ID 5baa52ca4932b8521893a0ddd4014641ceb3bbbd # Parent 4777378fc3bf85fbd1ff2e43b46bca85e837f85d rust-inner-revlog: always inline `get_entry` This is a very hot function. diff --git a/rust/hg-core/src/revlog/index.rs b/rust/hg-core/src/revlog/index.rs --- a/rust/hg-core/src/revlog/index.rs +++ b/rust/hg-core/src/revlog/index.rs @@ -448,6 +448,7 @@ impl Index { /// /// The specified revision being of the checked type, it always exists /// if it was validated by this index. + #[inline(always)] pub fn get_entry(&self, rev: Revision) -> Option { if rev == NULL_REVISION { return None;