[pypy-dev] Why isn't PyPy compiling itself not the same as CPython?

wlavrijsen at lbl.gov wlavrijsen at lbl.gov
Mon Mar 12 00:56:28 CET 2012


Christopher,

On Sun, 11 Mar 2012, Christopher Swenson wrote:
> I compiled PyPy with CPython, and I got a different binary than when I
> compiled it with itself:
>
> -rwxrwxr-x 1 swenson swenson 59314173 2012-03-11 17:45 pypy-c*
> -rwxrwxr-x 1 swenson swenson 59297884 2012-03-11 18:52 pypy-c2

willing to venture a guess, based on what I've experienced to my own
detriment: the annotator will actually follow, annotate, and make available
for the translation anything it can get its hands on during the translation,
even if those are otherwise run-time objects.

For example, if a (non-rpython) module in PyPy creates module-level objects,
then the execution of creating those objects is traced. If that creation uses
standard python modules, then in the CPython case that is just more python,
but it may lead to loading of rpython code (as part of the standard module's
internals) in the PyPy case. That code then enters into the translation and
will show up in the final .c files.

> Is there some randomness in translate.py?

Because of the above, I've had random differences, but that was a bug. :)

Best regards,
            Wim
-- 
WLavrijsen at lbl.gov    --    +1 (510) 486 6411    --    www.lavrijsen.net


More information about the pypy-dev mailing list