diff options
| author | Ivan Boldyrev <[email protected]> | 2023-09-09 23:45:31 +0400 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2025-03-16 21:24:05 -0700 |
| commit | d4aed8145b5478d62308319d2ad849e2a1e371db (patch) | |
| tree | 716c393994db3eade52b23384b660e94d95f0f6b /Cargo.toml | |
| parent | a2516b78c2617d9ad289aeec91a02cb05d70cc17 (diff) | |
Wasm32 SIMD implementation
This code is based on rust_sse2.rs of the same distribution, and is
subject to further improvements. Some comments are left intact even if
their applicability is questioned.
SIMD implementation is gated by `wasm32-simd` feature, portable version
is used otherwise.
Performance measurements with a primitive benchmark with ~16Kb of data:
| M1 native | 11,610 ns |
| M1 WASM SIMD | 13,355 ns |
| M1 WASM | 22,037 ns |
| x64 native | 6,713 ns |
| x64 WASM SIMD | 11,985 ns |
| x64 WASM | 25,978 ns |
wasmtime v12.0.1 was used on both platforms.
Closes #187.
Diffstat (limited to 'Cargo.toml')
| -rw-r--r-- | Cargo.toml | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -18,6 +18,11 @@ default = ["std"] # implementation uses C intrinsics and requires a C compiler. neon = [] +# The WASM-SIMD implementation does not participate in dynamic feature detection, +# which is currently x86-only. If "wasm_simd" is on, WASM SIMD support is assumed. +# Note that not all WASM implementation may support WASM-SIMD specification. +wasm32_simd = [] + # This crate uses libstd for std::io trait implementations, and also for # runtime CPU feature detection. This feature is enabled by default. If you use # --no-default-features, the only way to use the SIMD implementations in this |
