News for hackers. Stuff that matters.
Re:Measuring the overhead of WebAssembly using libsodium by magicalhippo on Wednesday April 10, 2019 @06:41AM (#19623392)
> An important point here is that the native code does use SIMD instructions[...]. Whereas the WebAssembly backend doesn’t support these.

I understand the reasoning of the author, still it would have been nice to have a comparison with non-SIMD native code for those of us who don't keep track of how much the SIMD buys you these day for crypto.

> On a surprising number of tests, Cranelift’s optimizations produced slightly slower code than with optimizations disabled.

So how much of this result is WASM and how much is Cranelift? By the sound of it, Cranelift doesn't produce very optimal output yet, so should still be potential for significant gains, no?

Re:Measuring the overhead of WebAssembly using libsodium by sunfish on Wednesday April 10, 2019 @07:40AM (#19623647)
Right now, a lot of it is Cranelift. We haven't yet done much optimization work on Cranelift yet, so there's a lot of room for improvement.
Re:Measuring the overhead of WebAssembly using libsodium by magicalhippo on Wednesday April 10, 2019 @09:00AM (#19624149)
Thanks. A factor 2-4x slower than pure native is totally acceptable for many workloads, and it sounds like that's a realistic goal. Exciting times.