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.
Permalink
Failed to load latest commit information.
no_std
.gitignore
README.md
bin.rs
mini.rs
original.cpp
rust.png
vector.rs

README.md

Raytraced Rust

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

Run it

  • rustc --opt-level=3 bin.rs
  • ./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 bin.rs -o rust
$ time ./rust > rust.ppm

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

These all render Rust.