[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Challenges in JIT compiling Lua
- From: Dibyendu Majumdar <mobile@...>
- Date: Tue, 21 Feb 2017 23:52:59 +0000
So while great performance can be obtained by providing type
annotations in Ravi, if no annotations are provided then the results
are not very good. Only about 2x improvement is achieved whereas when
type annotations are present, 10x improvement is possible.
The problem is that existing Lua programs cannot benefit from the
So I have the idea that now that Ravi has type specialised byte codes,
it is possible to think of doing following:
Specialise a Lua function by observing the types during execution.
JIT compile the specialised version.
This will require being able to switch back to interpreting if the
types turn out not as expected - thankfully due to the way Lua works,
this should be possible to do.
Seems doable except that I don't know when I will have the time to
work on this.