5 ms·
I personally think it's a bit premature to talk [edit: for the developers to talk] about it - they're attributing 2.25x to the addition of a JIT, which generall
by pizza234 6y ago
I personally think it's a bit premature to talk [edit: for the developers to talk] about it - they're attributing 2.25x to the addition of a JIT, which generally takes a long time to develop and tweak, adds a significant complexity, and makes the performance profile complex (ie. slow start, slow first requests, etc.).
I like though, to see the JIT wave across interpreted languages (see Ruby). I'm also curious to see what's going to be the implementation.
- dna_polymerase 6y agoThe problem with this and all other efforts for speed in CPython is the interop with C extensions. For JITted Python look at PyPy, sure the JIT gives you some performance, but they broke all C extensions along the way.
- heavenlyblue 6y ago> they broke all C extensions along the way. It doesn't have to be this way though?
- ploxiln 6y agoMany C extensions work with PyPy now. I have a service that uses pylibmc and pycurl, and it works with PyPy. Those extensions didn't rewrite with cffi or anything like that, PyPy added a compatibility layer, it's impressive. But, you don't get the JIT performance if you use the C extensions a lot, it's better for PyPy performance if you find a pure-python alternative for extensions used in "hot paths".
- chrisseaton 6y agoThe TruffleRuby approach is to run the C extensions in an interpreter with a JIT. This way you can change the C extension interface without changing the code, and the optimisations apply to both at the same time. https://www.youtube.com/watch?v=YLtjkP9bD_U https://www.youtube.com/watch?v=YLtjkP9bD_U
- MaxBarraclough 6y agoShouldn't a well-designed C extension interface work fine regardless of whether a JIT is used? Java's JNI interface, for instance, works fine with or without a JIT. Is it just that the interface was designed without JIT in mind?
- chrisseaton 6y ago> Shouldn't a well-designed C extension interface work fine... Yes! But we aren't working with one of those.
- fnord123 6y agoI personally think tracing JIT is a bad technology. It's over complicated and makes it hard to reason about runtime space and time efficiencies of code. I don't know the best route for python to get more performance but it probably involves allowing people to opt out of dynamism and basically doing what cython does but for all possible code.
- oefrha 6y agoYou're basically talking about mypyc: https://github.com/python/mypy/tree/master/mypyc https://github.com/python/mypy/tree/master/mypyc
- coldtea 6y ago>I personally think tracing JIT is a bad technology. It's over complicated and makes it hard to reason about runtime space and time efficiencies of code. Hasn't Strongtalk, Java, and JS put those concerns to sleep?
- rurban 6y agoAlso LuaJit. But just the most basic optimizations as done in PHP, a good lisp, scheme or lua would reach the 5x goal.
- fnord123 6y agoNo, trying to benchmark Java and JS are the reason for the concerns.
- jashmatthews 6y agoNone of the current Java or JS engines use tracing JITs, though?
- fnord123 6y agoIs there a precise difference between how openjdk works where it needs a warmup to begin running performantly and how a tracing jit works? If there a precise difference between how Ignition and Turbofan interact that is not a tracing jit? I really thought both Java and JS implementations were tracing jits. Because if I'm going to whinge about technology I don't like I want to whinge about the precise problem. :)
- coldtea 6y ago>I personally think it's a bit premature to talk about it Has that stopped HN before? We have devoted several top posts to the V language, LightTable, and several clearly doomed-to-fail efforts. This, in comparison is rather tame, from a legitimate source, and even if it just gives 2x performance, that will still be something. PHP, for one, pulled it off, with PHP7.
- pizza234 6y agoI meant on the developer's side, rather than for the public to discuss it. I've edited the post to make it clearer.
- fizixer 6y agoIs there a name for the idea of "adaptive JIT"? where the code starts executing without JIT, while another thread is instantiated that is doing JITting in the background, and as soon as the JITting is done, JITted version takes over seamlessly for the rest of the execution.
- chrisseaton 6y ago> Is there a name for the idea of "adaptive JIT"? Some people say 'dynamic JIT' (for example HotSpot) as opposed to a 'static JIT' (for example .NET.)
- coldtea 6y agoMost modern JITs have several tiers like that...