Building with -O2 is usually all you need to do to get good performance, but there are some specific issues, for example setjmp and C++ exceptions are quite slow, and 64-bit integer math is fairly slow. Some notes here:
https://github.com/kripken/emscripten/wiki/Optimizing-Code https://github.com/kripken/emscripten/wiki/CodeGuidelinesAndLimitations The best strategy is to use the JS profilers in firefox and chrome, to see where the slow points are, on a -g2 build (fast, but with debuggable source). If you can put up a public build please link to it, we can help. - Alon On Sun, Dec 29, 2013 at 1:03 PM, Juan Linietsky <[email protected]> wrote: > Ah thanks! I finally got it to work, i just ran again the python script to > generate the files. > I'm not really seeing the performance though, this is a port of a large > game engine which works great even on an old Sony PSP, old phones and even > Google NaCL, but it's really, really slow on emscripten+asm.js. > I suppose I'm doing something wrong, so is there some documentation on > recommendations on how to optimize the code for this target? > > Thanks! > > Juan > > > >> -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
