Post

@jorropo.net burst my bubble; this could actually be observable by a very goofy case of a boxed nil interface call, something that the Go test suite did not test! But, it's still salvageable; just generate one wrapper instead of zero, which is just a simplification of my second CL. redone

go-review.googlesource.comgo-review.googlesource.comGerrit Code Review
Jake Bailey@jakebailey.dev

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.

But it does change stack traces, but thankfully just for that edge case, which, again did not have a test 🫠 That or, maybe the spec should change or be reinterpreted in such a way that we can avoid the wrappers entirely...?

0 reposts1 like

No replies yet.