changeset 51892:5baa52ca4932

rust-inner-revlog: always inline `get_entry` This is a very hot function.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 12 Sep 2024 10:09:06 +0200
parents 4777378fc3bf
children eb9dea148233
files rust/hg-core/src/revlog/index.rs
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/index.rs	Thu Sep 12 10:08:45 2024 +0200
+++ b/rust/hg-core/src/revlog/index.rs	Thu Sep 12 10:09:06 2024 +0200
@@ -448,6 +448,7 @@
     ///
     /// 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<IndexEntry> {
         if rev == NULL_REVISION {
             return None;