These are chat archives for dropbox/pyston

18th
Mar 2016
Brett Cannon
@brettcannon
Mar 18 2016 00:34
And I just noticed that you were at least aware of it since yesterday; any feedback on the PEP would still be appreciated.
Marius Wachtler
@undingen
Mar 18 2016 11:08
Our JIT is tightly entangled with cpythons code. This API would not be enough for us.
There are several places where we use different object layout for example (e.g. we currently don't have a ob_refcnt field, we use hidden classes, ...).
Also we currently don't use the cpython bytecode but instead our own. So we would at least need a step which converts the the cpython bytecode into our own. I don't think this would be to hard to do it's more the problem of the different object layout.
I think this API is very minimal (which is good :-)) and should allow one to write a JIT which removes the bytecode dispatching overhead and maybe a little bit more but I don't think it's enough for stuff which needs different object layouts.
But I don't think one can come up with an generic API for the object layout changes etc so this should not be any criticism about this API. One just has to realize that this will only allow a subset of the techniques that other JITs do to get good perf. But maybe a minimal JIT is already a good improvement for many python uses. (I kind of doubt it a little bit because I noticed that because of the highlevel bytecode of cpython quite little time get's spend in the dispatch loop but I'm looking forward to see such JITs to see what there perf is)
Marius Wachtler
@undingen
Mar 18 2016 11:16
So sorry I don't have really any feedback to give about the API.
I took notice of Pyjion when you announced it and I'm tracking it's status and looking forward to see in what perf number your approach results in :-).
Chris Seaton
@chrisseaton
Mar 18 2016 12:12
It's like 'Threads Cannot be Implemented as a Library' (the Boehm paper) - a useful JIT can't be implemented totally outside the VM as it needs intimate knowledge and control of almost every other part of the VM
If you don't have hooks into the class hierarchy for example, how can you speculate on class layouts being stable
How does your JIT generate write barriers if it knows nothing about the GC, etc
Brett Cannon
@brettcannon
Mar 18 2016 15:48
Thanks for the input everyone! I figured it probably wouldn't fit your use-case perfectly but I had to at least ask since I get asked "what about Pyston?" regularly enough at this point. :smile:
Marius Wachtler
@undingen
Mar 18 2016 15:59
Thanks for taking the time to ask :-)