Hacker News new | ask | show | jobs
by stromgo 3113 days ago
Those of you who tried WebAssembly, what kind of performance are you getting compared to native? In my application, execution time is about 200% of native, which is quite bad compared to the few benchmarks I could find: https://hacks.mozilla.org/2016/10/webassembly-browser-previe... https://blog.acolyer.org/2017/09/18/bringing-the-web-up-to-s...

It's a head-scratcher as my code is nothing special and I don't see what I could be doing wrong. Then it occurred to me that these benchmarks look suspicious, with many scores below 100%. Are there fair benchmark results somewhere, measured by someone not trying to promote WebAssembly? What performance ratios are HN readers getting currently, and what performance ratios should we expect in the long term?

3 comments

Do you have your code online somewhere? What kind of tasks are you trying out? How much time is spent sending data back and forth between WASM?
https://floooh.github.io/sokol-html5/index.html

You can compile these samples natively and compare yourself.

I haven’t done much personally yet, but I hear it can vary quite a bit between browsers.