Given the ongoing discussions about Go's performance in the benchmark
game, I thought I'd take a look to see if there was any low hanging
fruit to pick. Based on
the binary-trees benchmark looked interesting. I profiled it and it
seems to spend most it's time allocating memory and GC:ing it again,
which is reasonable. So I changed it to use a slice based binary tree
instead of individually allocated nodes:
That executes in about one ninth of the time of the original, on my
laptop, putting it roughly on par with gcc and above Java.
So is this a more or less relevant benchmark? On the one hand, it's no
longer doing the same thing as for example the C or Java
implementations. On the other hand, it's solving the same "problem"
with the same(-ish) data structure and one of the points about Go is
being able to control the memory layout...
(Lets skip the obvious "it's just a synthetic benchmark, who cares"
discussion since that's the premise of the game here.)
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/groups/opt_out.