jdiwnab / OrbitSim

JavaScript Gravity simulator
13 stars 4 forks source link

Better point math #15

Closed jdiwnab closed 9 years ago

jdiwnab commented 9 years ago

Currently, every cart3.mult() call and such creates a new cart3 object. This is easy to work with but creates a large number of objects that slow down the simulation. Refactor to reduce the time taken in .mult and in constructors.

jdiwnab commented 9 years ago

Also consider using three.js for render. They may have made the operations faster.

jdiwnab commented 9 years ago

Profiling shows that now most time is spent doing actual calculations, rather than arithmetic. Closing