Skip to content

Commit

Permalink
indicate that the 2x_wide function is still experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
as-com committed Jan 1, 2021
1 parent de06352 commit 0f1026f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ For more details, please see [the source code for these benchmarks](benches/vari

## TODO
* Encoding multiple values at once
* Faster decode for two `u64` values with AVX2 (currently fairly slow)
* Parallel ZigZag decode/encode
* Support for ARM NEON
* Fallback scalar implementation
* Further optimization (I'm pretty sure I left some performance on the table)
Expand Down
1 change: 1 addition & 0 deletions benches/varint_bench/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
)
});

group.throughput(Throughput::Elements(2));
group.bench_function("varint-simd/2x_wide/unsafe", |b| {
b.iter_batched_ref(
create_double_encoded_generator_wide::<u64, u64, _>(&mut rng),
Expand Down
6 changes: 3 additions & 3 deletions src/decode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ unsafe fn dual_u32_stage2(comb: __m128i) -> __m128i {
)
}

/// Decode two adjacent varints simultaneously from the input pointer. Requires AVX2. Allows for
/// decoding a pair of `u64` values. For smaller values, the non-wide variation of this function
/// will probably be faster.
/// **Experimental. May have relatively poor performance.** Decode two adjacent varints
/// simultaneously from the input pointer. Requires AVX2. Allows for decoding a pair of `u64`
/// values. For smaller values, the non-wide variation of this function will probably be faster.
///
/// Returns a tuple containing the two decoded values and the two lengths of bytes read for each
/// value.
Expand Down

0 comments on commit 0f1026f

Please sign in to comment.