going to talk about my code without actually posting it cause it's on my rl github account
i've been working on a gravity simulation to model the cosmological structure of the universe
here are how many gravitational interactions a brute force approach would have to compute:
2^10 (periodic boundary conditions)
2^12 (number of timesteps)
2^32 (number of bodies squared)
2^1 (number of acceleration calculations per step of verlet)
2^55 (total)
2^55 is about 36000 trillion, which is a bit even for modern computers.
anyway i managed to optimize it down. i added a counter to see how many computations i ran, and it ends up equivalent to 2^35 gravitational interactions, or about 34 billion, which my laptop does inside of an hour.
that's a speed of factor of 2^20 -- around a million, which is not so bad if i say so. also i managed to get multiprocessing working so that's another speedup of 2^3 on top of everything