One more important thing I have left off from previous posts is that without these optimization options fed to the compiler it will not be fast! Make sure that you have "-O2 -s ASM_JS=1" as part of your build config. As far as I can tell the "-s ASM_JS=1" doesn't seem to do much, but the first part "-O2" makes a significant difference!
Your build command might look as follows:
~/emscripten/emscripten/emcc -O2 -s ASM_JS=1 main.cpp -o /var/www/html/test.html
Another thing to note is that you most likely should get the beta firefox version (currently 22) to see how your code performs with the latest asm.js optimizations.
No comments:
Post a Comment