A simple integer calculator using JIT compilation.
By means of the DynASM runtime assembler of the LuaJIT project, the expressions will be translated into x86-64 instructions. So they, the evaluation of the given expressions can be much faster than pure interpreters.
- Only integer operations are supported;
- add, substrate, multiply and divide;
- logic and comparison;
- function call;
- ternary operation;
Simply run make
and you should have the executable file jitcalc
.
Run make check
for some expressions.
jitcalc
is licensed under the MIT License.