/nbody_rust_vs_c

Converting benchmarksgame/nbody-gcc-8 to rust, following http://cliffle.com/p/dangerust

Primary LanguageCMIT LicenseMIT

n-body simulation in Rust and C

Following along with Cliff Biffle's learn Rust the dangerous way, we'll be converting an unsafe, heavilly-optimized n-body simulation from C (from the The Computer Language Benchmarks Game) to Rust.

Running

There is a top level makefile next to this README. If you make you should see the C and Rust implimentations get built and run for the default number of timesteps.

e.g.

make

gives

vvvvvv results vvvvvv
/usr/bin/make -C ./nbody/ run
./nbody-blah.run 50000000
-0.169075164
-0.169059907
^^^^^^ results ^^^^^^

The top-level makefile defers to 2 sub-makefiles next on the c and rust folders.