3 ms·
I lumped Emscripten/Asmjs in with the "C" benchmarks. The JVM verson of JBox2D 2.3 actually performs on par with asmjs (Firefox 27 numbers when this was taken).
by cromwellian 12y ago
I lumped Emscripten/Asmjs in with the "C" benchmarks. The JVM verson of JBox2D 2.3 actually performs on par with asmjs (Firefox 27 numbers when this was taken). JVM went from 5ms (jbox2d 2.2) vs (jbox 2.3) 3ms, so that puts the GWT version at about 50% (~6ms).
It might be possible to locate a few hot methods and instrument just those with asmjs assertions and see if it has any effect. I don't know how Firefox reacts to something that's "half-way" asmjs (asserts types on math expressions, but still uses objects with fields instead of typedarrays), but FTLJIT and Turbofan are claiming they'll make use of them even in the non-strict case. We'll see.
Right now I'm spending most of the my time implementing Java8 lambdas, Promises, and all that good stuff that removes the "tax" of java boilerplate so I don't have much time to explore it, but given how early Turbofan seems to be, waiting might be good anyway.