
Go does not inline functions when it should - lladnar
https://lemire.me/blog/2017/09/05/go-does-not-inline-functions-when-it-should/
======
copx
>My expectation would be that Go and Java should have similar performance in
due time. Indeed, both are modern garbage-collected languages supported by
major corporations with deep pockets.

Google only dedicates a small amount of resources to Go, the vast majority of
Google's software is not written in Go nor is that planned.

In contrast Java has enormous enterprise support, and not just one company
throwing money and manpower at it.

You can run a profitable company which does nothing but develop and sell a
special purpose garbage collector for Java.. try that with Go.

No, the comparison does not fit at all. Java is in a completely different
league.

------
chank
Not sure if this is a fair comparison/criticism. Java has had 20 years to
optimize what it does and doesn't inline and it isn't perfect either.

~~~
hyperpape
Who cares about fairness? This isn't about whether you like Go, or like its
creators. It's about the performance characteristics of the language. And
there the question is whether the comparison is representative, which sounds a
bit like "fair", but isn't really the same thing.[0]

The point about 20 years to optimize only matters so far as it gives you some
reason to believe that Go will improve, and catch up or surpass Java. If your
timeline is a decade or more, that's quite important. If your timeline is this
year, it's not.

[0] I think there's a lot of room to criticize this benchmark's
representativeness. It's literally one case.

------
stcredzero
Micro benchmarks don't matter. Only particular benchmarks of your
project/system matter. Benchmarks of how fast your team produces value matter
most.

~~~
ovao
A benchmark of how quickly a development team produces value has no relevance
whatsoever to whether a language can, or should, be more aggressive at
function inlining. These two notions are orthogonal.

The benchmark detailed doesn't necessarily make a bulletproof case for the
usefulness of more inlining in the Go compiler, as it's only a single
benchmark, but for its intended purpose it at least shines a light on one
aspect of the Go compiler the team may wish to evaluate more extensively in
the future.

------
pstuart
All in good time....

~~~
akerro
He could wait 2 weeks before Java9 is released.

