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

Matti Picus matti.picus at gmail.com
Tue Aug 14 07:09:31 CEST 2012


Welcome, your help is needed and appreciated.
One thing you might want to try is adding the functionality as a pure 
python. You should be
able to add a load function somewhere in the the 
lib_pypy/numpypy/core/directory, and
add tests to the lib_pypy/numpypy/tests directory.
Then just run (from the top pypy directory)
pypy/translator/goal/pypy pytest.py lib_pypy/numpypy/tests
Only if speed become your real bottleneck, or if you simply cannot 
implement your function
(load in this case) in pure python, would you want to dive into the 
murky depths of rpython.
Matti

On 14/08/2012 7:31 AM, Brandon Rhodes 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! :)
>



More information about the pypy-dev mailing list