|
I’m not sure I (or many others) would agree that “_javascript_ is extremely well designed and powerful” [1]. And in general attempts to add language-specific optimizations to CPU instruction sets have rarely fared well (e.g. Java native bytecode on ARM). The whole point (to my mind) of RISC was to move to a model where a very streamlined CPU + low-latency L1 cache was, in effect, an engine for efficient execution of VMs like Lua’s. In fact we were able to realize this very thing in our last project with Lua, in which pretty much the whole of the Lua VM, libraries, CPU stack and current set of Lua registers (stack frame) were all held in L1 cache on the CPU. In effect, the CPU at that point *IS* micro-coded for the Lua VM, and we saw spectacular performance from the VM as a result. —Tim |