Re:Golua – A Lua 5.3 engine implemented in Go
by skybrian on Friday November 16, 2018 @03:44PM
(#18471803)
I believe there are compiler improvements that can be made without changing the Go language, like computed goto's for large switch statements. That will help.
However, to really do as well as C, Go would need a more space-efficient union type. A Go interface is always two pointers due to how the garbage collector works, and that's not going to be as efficient as using something like NaN-encoding for a union between a pointer and a float64.
However, to really do as well as C, Go would need a more space-efficient union type. A Go interface is always two pointers due to how the garbage collector works, and that's not going to be as efficient as using something like NaN-encoding for a union between a pointer and a float64.