schteppe / cannon.js

A lightweight 3D physics engine written in JavaScript.
http://schteppe.github.com/cannon.js
MIT License
4.67k stars 709 forks source link

Simd.js support #210

Open bnolan opened 9 years ago

bnolan commented 9 years ago

With simd.js support getting closer to released browsers, it might be worth investigating what parts of cannon can benefit from SIMD instructions.

https://blog.mozilla.org/javascript/2015/03/10/state-of-simd-js-performance-in-firefox/

joates commented 9 years ago

+1

@schteppe how do you feel about branching the codebase so that you can accept PRs & run some benchmarks while this is a draft specification ? (without adversely affecting the current stable build)

schteppe commented 9 years ago

Sounds cool! I made a new branch for SIMD.js stuff: https://github.com/schteppe/cannon.js/tree/simd

Some thoughts from me:

bnolan commented 8 years ago

We can use a polyfill to emulate SIMD in non-compatible browsers (hopefully if it's implemented well using float32arrays it'll still be just as fast), and it might be helpful porting some of cannon to use array buffers anyway!

bnolan commented 8 years ago

I think we should endeavour to not change the API at all, the cannon api is great fun to use. :)