3 ms·
So you did a wrapper around libjit and generated functions on-the-fly? I am not sure it counts as a full bytecode jit. :-) I did a very stupid jit for the Pig
by vkazanov 8y ago
So you did a wrapper around libjit and generated functions on-the-fly?
I am not sure it counts as a full bytecode jit. :-)
I did a very stupid jit for the PigletVM thing while working on the article and the difference was more like 1.2-1.5 compared to the first naive interpreter.
- UncleEntity 8y agoWasn't saying it was a full bytecode jit (that's a full on big project in itself) I was just doubting the numbers. Here's the (old, apparently before I figured out how to translate gcd2) file: https://github.com/eponymous/libjit-python/blob/master/sample/gcd_benchmark.py https://github.com/eponymous/libjit-python/blob/master/sampl...
- vkazanov 8y agoWell, this is the perfect case for jits: basic number crunching. Bytecode interpreters are pure overhead in this case. Problems usually come from jumping between jitted/non-jitted code or, say, pointer chasing in complex objects. Did you find any use for the libjit wrapper? is it usable practically?
- UncleEntity 8y ago> Did you find any use for the libjit wrapper? is it usable practically? Other than it starting me off on a multi-year dive down the compiler/interpreter rabbit hole I didn't do too much with it since I didn't really have the knowledge to use it at the time. I also want to rewrite it because the C++ libjit API is kind of wonky and it really should be using the C-API but haven't gotten around to it yet. Someday I'll get motivated and work on it again, have a couple half finished projects that could use it as a back end if I ever get around to finishing them.