Function varint_simd::decode_two_wide_unsafe
source · pub unsafe fn decode_two_wide_unsafe<T: VarIntTarget, U: VarIntTarget>(
bytes: *const u8
) -> (T, U, u8, u8)
Available with target feature
avx2
only.Expand description
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.
Safety
There must be at least 32 bytes of allocated memory after the beginning of the pointer. Otherwise, there may be undefined behavior. Calling code should ensure that AVX2 is supported before referencing this function.