Ray tracer Benchmark
Source code
Compile commands
The following compiler versions and command-line arguments were used to generate the executables or heap images (32-bit then 64-bit):
- C++: g++ 4.2.3:
g++ -O3 -ffast-math ray.cpp -o ray
g++ -O3 -ffast-math ray.cpp -o ray
- Java: Sun's JDK 1.6:
javac ray.java
javac ray.java
- OCaml: ocamlopt 3.10.0:
ocamlopt -rectypes -inline 100 -ffast-math ray.ml -o ray
ocamlopt -rectypes -inline 100 ray.ml -o ray
- SML: MLton Debian package 20070826-1:
mlton ray.sml
mlton -align 8 ray.sml
- SML: SML/NJ 110.65:
sml ray.sml
- Lisp: SBCL 1.0.11:
sbcl --eval '(compile-file "ray.lisp")' --eval '(quit)'
sbcl --eval '(compile-file "ray.lisp")' --eval '(quit)'
- Scheme: Stalin 0.11-4:
stalin -Ob -Om -On -Or -Ot -dP -dC -dh -q -d -db -architecture
IA32-align-double -no-clone-size-limit -split-even-if-no-widening -copt -O3
-copt -fomit-frame-pointer -copt -freg-struct-return -copt -malign-double -copt
-ffast-math ray
stalin -Ob -Om -On -Or -Ot -dP -dC -dh -q -d -db -no-clone-size-limit
-split-even-if-no-widening -copt -O3 -copt -fomit-frame-pointer -copt
-freg-struct-return -copt -ffast-math ray
- Glasgow Haskell Compiler 6.8.1:
rm -f ray ray.hi ray.o; ghc-6.8.1 -O3 -fvia-C -funbox-strict-fields -optc-O3
-fexcess-precision -optc-ffast-math -funfolding-keeness-factor=10 ray.hs -o ray
Run commands
The following commands were used to run the programs:
Output
All of the programs generate the same ray traced image, containing
Figure: Ray traced scene.
|
Read OCaml for Scientists now!
|
|