[pypy-dev] Differences performance Julia / PyPy on very similar codes

Yury V. Zaytsev yury at shurup.com
Thu Dec 24 05:14:19 EST 2020

On Thu, 24 Dec 2020, Carl Friedrich Bolz-Tereick wrote:

> Another approach would indeed be (as you say in the other mail) to add 
> support for telling PyPy explicitly that some list can contain only 
> instances of a specific class and (more importantly) that a class is not 
> to be considered to be "dynamic" meaning that its fields are fixed and 
> of specific types. So far, we have not really gone in such directions, 
> because that is language design and we leave that to the CPython devs 
> ;-).

Hmmm, how about dataclasses ;-) Maybe those can be used as optimization 
targets under some reasonable assumptions:

class Point3D:
     x: float
     y: float
     z: float

Feels pythonic much to me...

Sincerely yours,
Yury V. Zaytsev

More information about the pypy-dev mailing list