|Subject:||Emacs Lisp JIT Compiler|
|Date:||Mon, 5 Dec 2016 18:16:19 +0000|
I’ve published my Emacs Lisp JIT compiler for comments and review:
The JIT compiler implements a strategy of turning the byte code execution loop into a series of function calls, moving the overhead of the loop into the CPU execution unit. I call this ‘compiling down the spine’ of the byte code vector. No other changes have been done to the byte code instructions other than to map them to the new execution strategy.
This is work in progress and about ~90% complete and was done about 4 years ago, so it’s quite a bit off of HEAD right now. It ‘works’ to the point of being able to JIT compile and run my included ray-tracer with a 25% speed improvement. Enabling full JIT during compilation shows bugs and will fail; I haven’t been able to track down the cause of these failures yet.
By default, this build will provide the Lisp function 'jit-compile’ which takes a lambda _expression_ or a symbol.
A new byte code instruction has been added Bjitcall. When a function is JIT compiled, it’s code vector is replaced by the single Bjitcall instruction followed by the JIT compiled code block.
I have already attempted to contact address@hidden to file my papers and was asked on Reddit to contribute this to a branch, which I am willing to do once the paperwork is done.
|[Prev in Thread]||Current Thread||[Next in Thread]|