WASM has a popcnt instruction, and will eventually have SIMD. I think the bridging cost is less than calling something through NAPI or a native add-on because you're still in the VM.
Great hash table by the way!
Great hash table by the way!
I hacked up a WAT file with this inside a function body and compiled it with wat2wasm --enable-simd
(local $2 v128)
(set_local $2
(i8x16.splat (i32.const 8))
)
And I get an error "invalid local type" when I try to run it within Node.