Open appetizermonster opened 7 years ago
Usually code is around half as fast as native, or better, but some things are currently much slower, like C++ exceptions and SIMD. If the code uses those features, that could be the reason.
You can use browser profilers to see what is slow, maybe it will show something.
And if you can create a benchmark showing the issue, please share it here.
Thanks for the advice Could you explain how to profile the compiled WebAssembly with browsers? I couldn't find a way to profile it. I only can see "wasm-function[xxx]" on the JavaScript Profiler in Chrome and Firefox even with the -g, --profiling options. There is no docs describes how to profile WebAssembly.
The wasm-function
problem is because wasm changed the names section format. That should be fixed on firefox nightly and beta, but is still a bug in release.
I've also had that issue, but I found adding -g to arguments to wasm-opt results in the profile including the original function name.
I'm building a Web Application using WebAssembly. but it's too slow on Chrome 59,and latest Firefox, different with my expectation. Someone says asmjs is faster than WebAssembly until now. Is there any ways to improve the performance of my WebAssembly program?