Have you tried with the llvm backend? I believe the results might be even better there!
$ time ./wasmer run --llvm fill_buffer.wasm -i fillBufferWithSIMD 1000real 0m5,233s
It seems to be a 25% longer run-time with LLVM backend. I did not know about that option! Very interesting.
Could you share the fill_buffer.wasm (or the WAT file) so I can do some tests? Thanks!
Hopefully I did not mess anything up!
If native performance is "very very very" not fast enough then that's supercomputer work and it doesn't really matter if WASM is 3x native or 0.3x native. So that context should be where you're the least depressed.
today's laptop work is late 90's supercomputer's work (and it was even more depressing back then).
That doesn't really change my argument. When you're looking at languages that are used for small tasks today, their speed doesn't have much relevance to how vastly bigger tasks are accomplished. And by the time those tasks can be run on a laptop, WASM implementations are going to be much better and we still might not be using it at all for those larger tasks.
At higher number of iterations the C version converges on about 1.7 seconds per 1000, while the WASM version seems to remain the same at 4.2 secs per 1000. This leaves native 2.5x faster for this particular operation, on my machine.