Jake Bailey @jakebailey.dev · Jun 15

This is a fun one: I just sent go.dev/cl/790740, which elides method wrappers for embedded types at offset zero, common for mixins/inherited data types. Doing this removes 60 _thousand_ method wrappers from tsgo's AST package, dropping the compilation of our main exe from 49s to 28s on my machine.

56 likes 3 replies

?

Replies

Noa 🪻 · Jun 15

hot damn, that's a big jump! i hope the review and acceptance process goes smoothly for you.

Alan Donovan · Jun 15

Nice! Does it change the stacks reported by the runtime?

Jake Bailey · Jun 15

It also shaves 1.3% off of the cmd/compile binary as it also uses embedding in the same way tsgo does for its AST/types (and, probably will even more in the future if I'm able to find time) In addition, 0.6% off of go, 0.66% off of pprof. This is more or less a "fix" for github.com/golang/go/is...