Re: Differences performance Julia / PyPy on very similar codes

"Yury V. Zaytsev" <[email protected]>
Newsgroups gmane.comp.python.pypy
Message-ID <[email protected]>
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:

@dataclass
class Point3D:
     x: float
     y: float
     z: float

Feels pythonic much to me...

-- 
Sincerely yours,
Yury V. Zaytsev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.