r/programming • u/ttsiodras • Dec 23 '12
Simulating a solar system with Python
http://users.softlab.ntua.gr/~ttsiod/gravityRK4.html
244
Upvotes
r/programming • u/ttsiodras • Dec 23 '12
View all comments
Show parent comment
2
u/bamdastard Dec 27 '12
no profiler, It's a fairly naive algorithm still that's n2.
I can say that it's about 1000 times faster than the pure python implementation using my GTX 670.
I'm torn with what direction I'd like to take it. More sophisticated algorithms like barnes-hutt require datastructures that are simply out of reach for opencl at the time being. Barnes-hutt would take it fro n2 to n*log n complexity. But I would likely have to implement it in pycuda instead. which alienates a large portion of potential users if I end up turning it into a game.