Open utterances-bot opened 3 years ago
Thanks for this awesome article!
I am now left to wonder why Go does things as it does, since it's clearly slower (moving around stuff from processor to memory and back). I guess it is just simpler to implement
Why - because it was simpler indeed.
There is a project ongoing to introduce a register-based calling convention, either in go 1.17, 1.18 or shortly afterwards. You can read more about it here: https://go.googlesource.com/proposal/+/refs/changes/78/248178/1/design/40724-register-calling.md
Thanks for the link. It doesn't affect me anyways, I just read yesterday that Go had an entirely different calling convention and I was intrigued to learn more.
The Go low-level calling convention on x86-64 · dr knz @ work
Note The latest version of this document can be found online at https://dr-knz.net/go-calling-convention-x86-64.html. Alternate formats: Source, PDF. Introduction This article analyzes how the Go compiler generates code for function calls, argument passing and exception handling on x86-64 targets. This expressely does not analyze how the Go …
https://dr-knz.net/go-calling-convention-x86-64.html