2 ms·
It is not as slow as it sounds. golang do heavy inline-ing and most of its performance comes from concurrency. Putting values on stack actually make concurrenc
by j16sdiz 8y ago
It is not as slow as it sounds.
golang do heavy inline-ing and most of its performance comes from concurrency.
Putting values on stack actually make concurrency easier.
That said, there is a proposal to do it in register: https://github.com/golang/go/issues/18597 https://github.com/golang/go/issues/18597
It is challenging and not in high priority. The current priority is do more inlining.
- pcwalton 8y ago> Putting values on stack actually make concurrency easier. Could you elaborate how?
- 1_000_000 8y ago> "It is not as slow as it sounds." Yes, it is. 5%-10% in the very link you posted. > "golang do heavy inline-ing" No, it does not. See https://github.com/golang/go/issues/17566 https://github.com/golang/go/issues/17566 > "most of its performance comes from concurrency" That's just ridiculous. They didn't write all crypto and math in assembly just for nothing. Lumping bunch of slow function calls onto several threads is not where performance magically comes from. And you are confusing concurrency and parallelism.