Added experimental SIMD support behind simd feature:
The Sum implementation will use SIMD
Added the following functions:
Hex::simd_add4
Hex::simd_add8
Hex::simd_min4
Hex::simd_min8
Hex::simd_max4
Hex::simd_max8
Other
Dropped legacy ser_de feature, use serde insted
Added new methods for Hex iterators:
min which computes the minimum value
max which computes the max value
Thoughts
I added a benchmark that shows that the SIMD sum is slower than a regular sum in release mode. So either my Mac is not supported by wide simd operations and is falling back to regular slower sums, or I'm using the crate wrong.
Also the min/ max methods are not using SIMD at all, wide provides them but the implementation is not using simd optimizations.
Work done:
SIMD
simd
feature:Sum
implementation will use SIMDHex::simd_add4
Hex::simd_add8
Hex::simd_min4
Hex::simd_min8
Hex::simd_max4
Hex::simd_max8
Other
ser_de
feature, useserde
instedHex
iterators:min
which computes the minimum valuemax
which computes the max valueThoughts
I added a benchmark that shows that the SIMD sum is slower than a regular sum in
release
mode. So either my Mac is not supported bywide
simd operations and is falling back to regular slower sums, or I'm using the crate wrong.Also the
min
/max
methods are not using SIMD at all,wide
provides them but the implementation is not using simd optimizations.I'm not sure that it's worth it.