3 ms·
Interpreting Go is a good idea. In fact, a JIT for Go would be a very interesting idea as well. In a language that makes heavy use of virtual dispatch like Go d
by pcwalton 7y ago
Interpreting Go is a good idea. In fact, a JIT for Go would be a very interesting idea as well. In a language that makes heavy use of virtual dispatch like Go does (via interfaces), you can often get a lot of mileage out of speculative devirtualization. With a JIT you can easily observe the concrete types that flow through each call site, allowing for optimizations you can't easily do with AOT compilation (without PGO, anyway). You can even do aggressive optimizations like observing that only one type that's currently loaded in the program conforms to an interface and devirtualize accordingly, knowing that you can undo that optimization if more code gets loaded later on that invalidates this assumption.
- tedunangst 7y agoDropping this here: https://github.com/gijit/gi https://github.com/gijit/gi
- eatonphil 7y agoWoah! That is an awesome project. Surprised this is the first time hearing of it. Thanks.
- tedunangst 7y agoThere is also the https://github.com/cosmos72/gomacro https://github.com/cosmos72/gomacro interpreter if you were unaware.
- eatonphil 7y agoI have been watching that one closely. :)