NativeJIT
ruby-libjit
NativeJIT | ruby-libjit | |
---|---|---|
2 | 1 | |
1,146 | 20 | |
0.0% | - | |
0.0 | - | |
about 5 years ago | over 13 years ago | |
C++ | Ruby | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
NativeJIT
-
NativeJIT: A C++ expression –> x64 JIT
(2018)
Bing uses internally a better version, but improvements are not merged back to github. See https://github.com/BitFunnel/NativeJIT/issues/84#issuecommen...
ruby-libjit
-
NativeJIT: A C++ expression –> x64 JIT
It's interesting to see C++ expressions being used to create what is I think an AST that then gets compiled. I would love to see some syntactic sugar, though. For example, `expression.Mul(rsquared, expression.Immediate(PI))` could be `rsquared * expression.Immediate(PI)`. With overloading, anything that is not a recognized type could be converted to an immediate, so it could simply be `rsquared * PI`. Simple control structures could be even implemented with lambdas.
I did this for ruby-libjit, and it made writing a JIT compiler much easier to read. Here's an example: https://github.com/cout/ruby-libjit/blob/master/sample/fib.r...
And a real-world example (one of the very earliest JIT compilers for ruby, written in ruby, dates back to the ruby 1.8.x days): https://github.com/cout/ludicrous/blob/master/lib/ludicrous/...
What are some alternatives?
mathpresso - Mathematical Expression Parser and JIT Compiler
ludicrous - Ludicrous just-in-time compiler for Ruby 1.8 and 1.9
llvm-project - The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.