Skip to content

Commit

Permalink
Force its way to CI benchmark runners
Browse files Browse the repository at this point in the history
  • Loading branch information
ogxd committed Nov 6, 2024
1 parent 7c5afa5 commit b7705c9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
- name: Update rust
run: rustup update

- name: Switch to nightly rust
run: rustup default nightly

- name: Benchmark
run: cargo bench --bench throughput --features bench-plot

Expand All @@ -32,6 +35,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Update rust
run: rustup update

- name: Switch to nightly rust
run: rustup default nightly

Expand All @@ -53,6 +59,9 @@ jobs:
- name: Update rust
run: rustup update

- name: Switch to nightly rust
run: rustup default nightly

- name: Benchmark
run: cargo bench --bench throughput --features bench-plot

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Switch to nightly rust
run: rustup default nightly

- name: Rust version
run: cargo rustc -- --version

Expand Down Expand Up @@ -52,6 +55,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Switch to nightly rust
run: rustup default nightly

- name: Rust version
run: cargo rustc -- --version

Expand Down
2 changes: 1 addition & 1 deletion src/gxhash/platform/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub unsafe fn get_partial_safe(data: *const State, len: usize) -> State {

let indices = _mm_set_epi8(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
let mask = _mm_cmpgt_epi8(_mm_set1_epi8(len as i8), indices);
std::intrinsics::simd::simd_masked_load(mask, data as *const i8, _mm_set1_epi8(len as i8))
State::from(std::intrinsics::simd::simd_masked_load(core::simd::i8x16::from(mask), data as *const i8, core::simd::i8x16::from(_mm_set1_epi8(len as i8))))
}

#[inline(always)]
Expand Down

0 comments on commit b7705c9

Please sign in to comment.