kidoman / rays

Ray tracing based language benchmarks
https://kidoman.com/programming/go-getter.html
95 stars 23 forks source link

Cmd line and output compatibility with go version. #21

Closed tkalbitz closed 10 years ago

tkalbitz commented 10 years ago

This pull request updates the command line options and the output file to mimic the Go version. Also you can have more than one render run in an program invocation

Here is an example:

java -Xms4096m -Xmx8192m -XX:+AggressiveOpts javarays/Raycaster 0.05 5
Starting render#1 of size 0.05 MP (223x223) with 8 threads. Completed in 1708 ms
Starting render#2 of size 0.05 MP (223x223) with 8 threads. Completed in 1711 ms
Starting render#3 of size 0.05 MP (223x223) with 8 threads. Completed in 1740 ms
Starting render#4 of size 0.05 MP (223x223) with 8 threads. Completed in 1714 ms
Starting render#5 of size 0.05 MP (223x223) with 8 threads. Completed in 1714 ms
Average time for rendering: 1718 ms
kidoman commented 10 years ago

Hey Tobias,

Have a look at https://github.com/kid0m4n/rays/commit/eb78a3e6b806a667787f1247fb97ad1029188e8e

@t-mat and I were both talking about hardcoding "render.ppm" is a smell which will probably haunt us in near future. Hence, I really like the idea of small wrapper shell scripts which have the responsibility of running their respective benchmark by invoking the command in an appropriate manner.

This will not only allow us to capture details like "-XX:+AggressiveOpts" (as in the example you showed above), it will also allow us to leverage the best each platform has to offer (command line parsing, for eg.)

To that effect, I have implemented a bunch of changes to the Go version. Summary:

I know these changes are massive and will take time to replicate across all programs (and now we already have 5) but the earlier to answer some of these issues, the better off we will be

What do you reckon?

kidoman commented 10 years ago

I am merging this in... it is a small change to get the desired state from here