Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.ml
golang·Go programming language discussionbysbinet

Go 1.22 inlining overhaul

The Go compiler’s inliner has never been particularly good. It wasn’t until Go 1.12, released in 2019, that the Go compiler supported inlining more than leaf functions, and we’ve slowly chipped away at more limitations of the inliner over the years (it started inlining functions with for loops in early 2021!). Go 1.20, released in February 2023, added support for basic profile-guided inlining, the most significant change to Go’s inlining policy since 1.12.

[...]

The rest of this document lays out a set of considerations for a redesign of Go’s inlining policy.

https://docs.google.com/document/d/1a6p7-nbk5PVyM1S2tmccFrrIuGzCyzclstBtaciHxVw/edit

Go 1.22 inlining overhaulhttps://docs.google.com/document/d/1a6p7-nbk5PVyM1S2tmccFrrIuGzCyzclstBtaciHxVw/editOpen linkView original on lemmy.ml
3

1 reply

I am very much looking forward to v1.22. Inlining was/ is one of the Achilles' heel of Go (and other languages).

There's a good issue (#21536) which explores possible ways to implement explicit inlining. Sadly, the proposal got closed without any change.

2

You reached the end

Go 1.22 inlining overhaul | Spyke