There are hardware instructions on X86 for approximate inverse square root and square root which can improved upon via newton's method.
See the for loop at the bottom of bodies_advance here: https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/nbody-rust-7.html
It would look a lot better if this example could be re-written to use purely safe, normal looking rust code.
There are hardware instructions on X86 for approximate inverse square root and square root which can improved upon via newton's method.
See the for loop at the bottom of
bodies_advancehere: https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/nbody-rust-7.htmlIt would look a lot better if this example could be re-written to use purely safe, normal looking rust code.