55 ms·
PyPy will likely be complete enough to use by the end of 2012, if not sooner. By that I mean most of the major libraries will work with it and people will ask t
by drats 15y ago
PyPy will likely be complete enough to use by the end of 2012, if not sooner. By that I mean most of the major libraries will work with it and people will ask themselves "why wouldn't I want a massive speedup?". The one reason why they might not is memory usage: it can be 10 times as much. That's significant in quite a few applications.
As it's beyond my ken I would like to know from someone capable of answering if this is going to be a constant constraint, stemming from the design of the project, or if memory usage is likely to go down at some point.
- viraptor 15y agoI believe the memory usage has been adressed lately (either last release, or shortly after). There was an article about it on HN, which i can't find atm. Do you mean some specific use cases?
- drats 15y agohttp://news.ycombinator.com/item?id=3349429 http://news.ycombinator.com/item?id=3349429 If you search for my username in that thread I asked for someone to run the code from the story on a similar dataset with PyPy. Twice as fast but x10 memory usage. But as I said elsewhere a bit of searching suggests it won't be a showstopper.
- reitzensteinm 15y agoBe careful extrapolating from such small examples, where the memory usage is dominated by fixed overhead. Running Django or something similar is more likely to give a real world result, and even then, a bunch of tests is far better. 3mb vs 30mb might be par for the course for smaller programs, but either is negligible.
- bdarnell 15y agoPyPy has higher memory usage than CPython for two main reasons: A) JIT-generated code, B) pure garbage collection lets dead objects live longer than CPython's refcount/GC hybrid. Neither of these is going to go away, although it's reasonable to expect the gap to narrow over time. More importantly, much of this extra memory is a fixed cost, so while simple programs will see a 10x increase, real-world programs should see a less dramatic impact. FWIW, my own tests of pypy 1.7 have shown the memory overhead to be about 3x: http://groups.google.com/group/python-tornado/browse_thread/thread/56438f7eb6e16971/e81ec9cf19ddbe7a?lnk=gst&q=pypy#e81ec9cf19ddbe7a http://groups.google.com/group/python-tornado/browse_thread/...
- eliben 15y agoWhat about start-up time? Isn't it significantly longer with PyPy? [disclaimer: this is not FUD, but a honest curiosity]
- kbd 15y agoTry it. It's very slightly longer than CPython. It's nothing like, say, the JVM.