aboutsummaryrefslogtreecommitdiff
path: root/src/wasm32_simd.rs
AgeCommit message (Collapse)Author
2025-09-29some more unsafe blocks, in wasm32_simd.rsJack O'Connor
2025-06-20Update wasm32_simd.rskilavvy
2025-06-16Update wasm32_simd.rsleopardracer
2025-03-16Make some function safeIvan Boldyrev
Certain functions' unsafety comes from v128 loads and store. If argument types guarantee that these loads and stores are safe, function is declared safe, and internal unsafe blocks are commented.
2025-03-16Remove unsafe from functions that do not need itIvan Boldyrev
Wasm SIMD API has certain function safe.
2025-03-16Misc textual improvementsIvan Boldyrev
2025-03-16Wasm32 SIMD implementationIvan Boldyrev
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.