[pypy-dev] numpypy unit tests

Yury V. Zaytsev yury at shurup.com
Sun Jan 3 02:19:14 EST 2016


On Sun, 2016-01-03 at 02:07 +0100, Sergey Matyunin wrote:
> 
> -Compiling pypy for linux on takes about 1 hour, right?

Something in this range, depending on your hardware.

> -Does faster build mode exist? Probably with less optimizations
> (without -O3 etc.)

As you might have already noticed, most of the time goes into
*translation* and not compilation itself. Unfortunately, translation is
still single-threaded, and therefore doesn't benefit from having more
cores. One thing that you definitively should do is to translate PyPy
with the latest version of PyPy instead of CPython, this makes a huge
difference. I think it is also still possible to disable gc to speed the
translation up a bit, but I'm not sure if this makes much sense (see
below).

> -Is there way to rebuild only micronumpy?
> -How do developers usually debug modules such as micronumpy? I am
> curious about tools and techniques.

PyPy has a interpreted mode, in which the interpreter is interpreted,
rather than translated and compiled. This mode is way too slow for
normal usage, but it's good enough to run most of the tests.

The developers usually write tests for the functionality they want to
implement and make sure they fail, then implement it and make sure they
pass in the interpreted mode (without doing full translations between
the iterations). Only then they run a full translation or wait for a
nightly, and hopefully the tests still pass for the translated version
as well.

P.S. As a side note, I found it curious and amusing that lots of people
are talking TDD, but apparently for a project of complexity and scale of
PyPy, there is simply no other practical way to do development,
irrespectively of whether you like it or not :-)

P.P.S. Feel free to re-use my email for a FAQ and such, if something
along these lines isn't already in there...

-- 
Sincerely yours,
Yury V. Zaytsev




More information about the pypy-dev mailing list