Get the latest tech news
Compilers for free with weval
With some partial evaluation and specialization hints, it is possible to get pretty decent speedups on interpreters by turning them into compilers.
Weval isn’t a whole program optimizing compiler and might not be able to prove that a memory location (in this case, the locals array) never escapes or aliases something else. Chris gave some more detail about how weval works in this talk(PDF), including a description of how the interpreter function is actually combined with the bytecode. There are a bunch of fiddly details to make it work well, and Chris also plans to write a blog post covering weval and its application to SpiderMonkey soon.
Or read this on Hacker News