4 ms·
There is also another project named HappyJIT doing much of what is described there. The corresponding paper was presented at last year's Dynamic Languages Sympo
by sb 14y ago
There is also another project named HappyJIT doing much of what is described there. The corresponding paper was presented at last year's Dynamic Languages Symposium [http://dl.acm.org/citation.cfm?id=2047854 http://dl.acm.org/citation.cfm?id=2047854]
It would be nice if there were comparable benchmark results available, or a discussion of what is different between both approaches/implementations.
EDIT: bb link didn't work, replaced it with ACM portal link.
- fijal 14y agoindeed, the happyjit is not included here in the comparison. I've read the paper (which I of course cannot access via ACM) and their benchmark results were not that good. They were using an old version of PyPy and did not use some of the advanced features of the JIT generator.
- ahomescu1 14y agoAs one of the authors of Happy, your post got me very interested. We wrote the paper over a year ago, we used a version of PyPy from back then. It's possible that we get a bigger speedup with a newer PyPy. It's interesting that you mention the advanced features. I looked at Hippy and the most interesting JIT feature Hippy uses is _virtualizable2_, which virtualizes all function locals and unboxes them. We tried using it ourselves, but it forces each function to have a static list of variables and no dynamic variable accesses (like $$x). It looks like Hippy falls back to the regular implementation for dynamic variable accesses, where the entire list is stored in a dictionary. Now I'm wondering how much this happens in real-world code, we assumed it does happen enough times. Also, I'm working on posting a publicly-available version of the paper. I'll post a link when I do that.
- fijal 14y agoFor dynamic variable access you do what PyPy (the python interpreter) does for globals. You indeed fall back to a dict, but you keep a dict of cells, that is indexes in the list, not the dict of variables. That way you have extra indirection, but all accesses that are static are efficient, even if you have a dynamic access somewhere (which indeed need to do a lookup, but too bad). I fear this is not the best place to discuss further though, you have my mail.
- ahomescu1 14y agoRight, we can continue this by e-mail.
- obtu 14y agoI found this link, I assume you found the time to upload it? http://www.ics.uci.edu/~ahomescu/happyjit_paper.pdf http://www.ics.uci.edu/~ahomescu/happyjit_paper.pdf