Well, yes - some JIT could be done, but it's never going to make Espruino 'fast'. I think Tessel is a good example here - they compile to Lua and now run in LuaJIT which is known to be one of the faster and more efficient embedded interpreters... And yet it's actually still nowhere near as fast as native code, which isn't that surprising when you think about it.
That's why I think the compiler is going to be really exciting. By doing all the heavy lifting on the PC you can make code that has the types of variables inferred and that is properly optimised and fast. But you can do that without having to have any overhead on the device itself.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Well, yes - some JIT could be done, but it's never going to make Espruino 'fast'. I think Tessel is a good example here - they compile to Lua and now run in LuaJIT which is known to be one of the faster and more efficient embedded interpreters... And yet it's actually still nowhere near as fast as native code, which isn't that surprising when you think about it.
That's why I think the compiler is going to be really exciting. By doing all the heavy lifting on the PC you can make code that has the types of variables inferred and that is properly optimised and fast. But you can do that without having to have any overhead on the device itself.