No description, website, or topics provided.
Rust C++ C
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Raytraced Rust

A Rust version of the C++ "business card" ray tracer.

Run it

  • rustc --opt-level=3
  • ./bin > rust.ppm
  • convert rust.{ppm,png}
  • Open rust.png with your favourite viewer

Compare it

$ g++ -O3 -lm original.cpp -o cxx
$ time ./cxx > rust.ppm

real    0m17.923s
user    0m17.900s
sys     0m0.012s

$ clang++ -O3 -lm original.cpp -o cxx
$ time ./cxx > rust.ppm

real    0m13.755s
user    0m13.744s
sys     0m0.000s

$ rustc --opt-level=3 -o rust
$ time ./rust > rust.ppm

real    0m17.883s
user    0m17.368s
sys     0m0.500s

These all render Rust.