3 ms·
Go seems like a suboptimal language for implementing an interpreter, since it lacks the low level primitives to make a fast interpreter loop. But I guess, as w
by the_duke 6y ago
Go seems like a suboptimal language for implementing an interpreter, since it lacks the low level primitives to make a fast interpreter loop.
But I guess, as will all things Go, that it will be fast enough for a good amount of use cases, and having a language native dependency rather than messing with C libraries is always a plus.
- Propolice 6y agoYes, Go is fast enough for some tasks. Before this I was doing C and PUC-Rio Lua. Was obsessing too much with C pitfalls, valgrind, and the sanitizers. Then LuaJIT FFI + Rust, good I like it better but found GopherLua the easiest. I'd stick with LuaJIT+Rust for anything that needs less resources and speed.
- ampdepolymerase 6y agoIf he really wanted to, he could have written it as a JIT and generate ASM directly. Writing an executable page is quite trivial in Go.
- pjmlp 6y agoGo has all the required primitives, unsafe and assembler as part of the toolchain.