On 13.09.21 17:29, Yury V. Zaytsev wrote:
On Mon, 13 Sep 2021, Matti Picus wrote:

The release notice https://doc.pypy.org/en/latest/release-v7.3.6.html
As always, edits are welcome.

It would be very interesting to know, how the amazing translation
speedup has been achieved (I hope not by removing the fractal rendering,
right?), but in this version of release notes, the issues are mostly not
linked...

Not to worry, the fractal is still there :-) – computing it takes ~1s of
the total runtime.

The speedup was achieved in relatively boring ways:

- there was an algorithm that was (weakly) quadratic in one of the
translation phases, in the number of functions analyzed. Making this
linear already helped a lot.

- many minutes were saved by implementing a graph algorithm in a
somewhat more clever way: the algorithm finds cycles in the call graph
to insert stack checks. The algorithm walks the call graph many times. I
managed to speed that up by first removing all obvious leaves and trees
of leaves from the call graph, that can definitely not contribute to a
cycle.

- When GCC is used we now use a pre-compiled shared header. This also
helps massively, because the C code that we produce shares a single
enormous header that hundreds of other files include. This leads to the
header being parsed and analyzed again and again, which is particularly
annoying if the .c file that includes it is itself tiny.

In summary, nothing deep, lots of legwork.

Cheers,

Carl Friedrich

_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to