Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force its way to CI benchmark runners
Browse files Browse the repository at this point in the history
ogxd committed Nov 6, 2024
1 parent 7c5afa5 commit b7705c9
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
@@ -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

@@ -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

@@ -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

6 changes: 6 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -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

@@ -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

2 changes: 1 addition & 1 deletion src/gxhash/platform/x86.rs
Original file line number Diff line number Diff line change
@@ -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)]

0 comments on commit b7705c9

Please sign in to comment.