Skip to content

Commit

Permalink
inline index()
Browse files Browse the repository at this point in the history
  • Loading branch information
RagnarGrootKoerkamp committed Sep 22, 2023
1 parent 4b25317 commit 39a3411
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion justfile
Expand Up @@ -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}}
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Expand Up @@ -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);
Expand Down

0 comments on commit 39a3411

Please sign in to comment.