We need to do better in the benchmarks game


#1

Rust isn’t doing too well in the benchmarks game. Has anyone thought of ways to optimize the benchmark programs?

In particular, Go beats Rust for 5 of the benchmarks, and Rust beats Go for only 4. That seems embarrassing.


#2

Most of the areas in which Rust is truly slow are because of unstable simd.


#3

Where does Go use SIMD?


#4

I haven’t looked at the Go code, I just know that lack of stable SIMD is holding us back on a number of these benchmarks.


#5

You are talking about C/C++ Code. But if Go beats rust without SIMD, then you have a fair comparison.


#6

Edit: It seems this still gets hits, at the time of this edit Rust beats the crap out of Go in the benchmarks game.

If you are interested in this you may want to read this thread. We may be more precise in interpreting the results than just the number of wins/loses.

  • regex-dna: Go is 570% slower.
  • binary-trees: Go is 430% slower, measures allocation, Rust uses a memory pool.
  • pidigits: Go is 70% slower, measures FFI.
  • fasta: Go is 58% slower.
  • k-nucleotide: Go is 17% slower, measures hash speed but Rust code seems more optimized.
  • mandelbrot, spectral-norm and fankuch-redux: Tied with Go ahead by 1%.
  • n-body: Rust is 10% slower.
  • fasta-redux: Rust is 73% slower.
  • reverse-complement: Rust is 90% slower.

So taking out the ties Rust loses 3 and wins 5, with much more expressive wins in regex-dna and binary-trees. Not embarassing at all.