On 25/09/13 04:13, Tim Kuehn wrote:
To make it a "fair" fight, I converted the Go and C++ versions to trace "Rust" instead. These are my results on my Macbook Pro:

=== RUST ===
$ rustc -O bin.rs <http://bin.rs>
$ time ./bin > rrays.ppm

real0m14.472s
user0m14.102s
sys0m0.365s

=== GO ===
$ go build main.go
$ time ./main > grays.ppm

real0m13.928s
user0m13.914s
sys0m0.020s

=== C++ ===
$ gcc -O crays.cpp
$ time ./a.out > crays.ppm

real0m10.800s
user0m10.794s
sys0m0.005s

=== RANKINGS ===
1) C++ : 10.8s
2) Go   : 13.9s
3) Rust : 14.5s



This surprises me a lot (the fact that Go is (1) faster than Rust, (2) it's only 20% slower than C++, compared to 150+% originally), so I investigated, and found that the Go is "cheating" with an algorithmic improvement: https://github.com/kid0m4n/gorays/commit/249f229ba8c769c38d7dc018acfdf29cc86d6e43

If it's possible, could we re-run the benchmarks with the commit before that?

Huon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to