From 39a3411332f70bde37de90221c9f460bd8b79f9a Mon Sep 17 00:00:00 2001 From: Ragnar Groot Koerkamp Date: Fri, 22 Sep 2023 14:36:48 +0200 Subject: [PATCH] inline index() --- justfile | 2 +- src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index 4400c3c..5b48778 100644 --- a/justfile +++ b/justfile @@ -12,7 +12,7 @@ test: sudo cpupower frequency-set --governor performance -d 2.6GHz -u 2.6GHz > /dev/null ## Queries -bench target="queries" *args="": cpufreq +bench target="queries_exact_fastmod" *args="": cpufreq cargo test -r -- --test-threads 1 --nocapture {{target}} {{args}} flame target="queries_exact_fastmod64" *args="": build cargo flamegraph --open --unit-test -- --test-threads 1 --nocapture {{target}} {{args}} diff --git a/src/lib.rs b/src/lib.rs index e2efb46..a8d7ba1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -218,6 +218,7 @@ where self.k = Packed::new(k); } + #[inline(always)] pub fn index(&self, x: &Key) -> usize { let hx = self.hash(x); let i = self.bucket(hx);