[pypy-dev] what does the debug cycle look like?

Alex Gaynor alex.gaynor at gmail.com
Tue Aug 14 06:44:58 CEST 2012

On Mon, Aug 13, 2012 at 9:31 PM, Brandon Rhodes <brandon at rhodesmill.org>wrote:

> I need some help.
> I want to help add more numpypy goodness to PyPy, so that I can rewrite
> my PyEphem astronomy module as pure Python instead of having to always
> maintain a C extension.  I will then tell the users who are doing large
> calculations, and need extra speed, that they can run their script on
> PyPy and have it run blazing fast.
> My problem is that I am not sure how to start adding code to PyPy in
> such a way that I can try out my code more than once within a single
> work day, because it is taking 5+ hours to build the translator on every
> platform to which I have access.  This did not surprise me on my 2003
> Dell PowerEdge 400SC, with its 2GB of kind-of-working RAM, which wound
> up taking 5h 28m to complete the build.  But I just got finished trying
> the build on the fastest computer in the house - my wife's few-month-old
> iMac with 4GB of memory - and it actually took *longer*, finishing up a
> full 5h 53m (!) after it started.
> And, actually, that's not the big problem.  The big problem is that
> whereas C Python uses Make, so it only re-compiles the files I have
> changed when I am in a tight development loop, it seems that PyPy starts
> the whole translation process over again when I run it.  How does one
> actually iterate when working on part of PyPy and its libraries?
> Only now that it is past midnight, as I write this, do I realize that my
> subsequent builds of PyPy can be done with the PyPy interpreter itself,
> speeding things up considerably!  But even if I can bring down the build
> time to under a half-hour, I can hardly imagine doing software
> development under the constraint of such delays - what am I missing?
> My first feat, should it success, will be writing load() for numpypy
> since that it the first missing feature I noticed when I tried running
> my prototype "jplephem" package - my first attempt at doing heavy-duty
> astronomy in pure Python.  I had hoped to have the package run and walk
> away with a number to compare to the pure C performance, but instead I
> get the fun of contributing! :)
> --
> Brandon Rhodes      brandon at rhodesmill.org
> http://rhodesmill.org/brandon
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> http://mail.python.org/mailman/listinfo/pypy-dev

The trick is tests!  Tests can be run without translating (actually the
whole interpreter can, but we like tests :D).  Just run `pytest.py
pypy/module/numpypy/` and you're running the tests, they take like a minute
or two, which is way too long IMO, but it's
totally serviceable for iterative development.  The only reason we ever
translate is to asses the performance of something.


"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120813/29d0550e/attachment.html>

More information about the pypy-dev mailing list