|
|
|
|
|
by josephg
4616 days ago
|
|
Author of ChipmunkJS here. I did some benchmarks moving things to typed arrays about a year ago, and the change was a wash in my benchmark results. I think that might not be the case now considering all the optimizations the v8 team have been making to asmjs-like code. I did some quick benchmarks using emscripten recently and performance absolutely blew away my hand-tweaked chipmunk code[3]. Hand optimized, ChipmunkJS takes 2.8x as long to run the tests. Emscripten compiled chipmunk is 1.4x, so twice as fast. That said, the generated code is huge and awful, and the API is terrible. I've been playing around with porting my library to LLJS recently, but when I looked at LLJS it hadn't been updated in over a year. Its nice to see that there were some commits a few months ago, but LLJS needs a lot of work before its generally usable. I've been doing some stuff manually as a toy - still not sure where to go with all of this. Bridging from ASMJS to regular javascript makes your API really hard to use. --- [1] https://github.com/josephg/Chipmunk-js [2] https://docs.google.com/spreadsheet/ccc?key=0Ap2hDnCZnXiVdDV... , though this is somewhat hard to read. [3] http://josephg.com/blog/chipmunkjs-and-emscripten [4] http://josephg.com/blog/chipmunk-in-asm-js |
|