[Python-Dev] [Core-mentorship] C version of weakrefset.py.
bhavishyagopesh at gmail.com
Thu Jun 22 09:54:36 EDT 2017
1)I might be totally wrong here, but even if we go with stripping
annotation(in .pyc)...still the "lag" that comes from ABCs needs to be
2) I been reading for past few days about your fat-optimizer project and
the corresponding TO-DO list, if you think that PEP-0511 should be
improved, I can work on that.
3)Also I was seeing to existing repos which implement some-kind of
Finally I wanted to decide upon a roadmap, so that I could put more
specific efforts.(fat optimizer?)
On Wed, Jun 21, 2017 at 8:05 PM, Victor Stinner <victor.stinner at gmail.com>
> 2017-06-21 15:21 GMT+02:00 INADA Naoki <songofacandy at gmail.com>:
> > ABC slowdown Python startup only 2ms. But importing typing module take
> > While typing is not imported from site.py, many new Python application
> > will import it.
> > It may take over 100ms for applications or libraries heavily depending
> on ABCs.
> When typing is not used in the application, only used for static
> checks, you can try to "strip" annotations to avoid any overhead on
> the application startup. It's not only a matter of "import typing",
> it's also the cost of instanciating types like "List[int]" (or even
> more complex ones).
> I discussed with Jukka Lehtosalo at Pycon US about stripping
> completely annotations. He told me that my PEP 511 may be a good
> solution to keep annotation in the .py code, but strip them for
> "production code", in the cached .pyc files:
> "PEP 511 -- API for code transformers"
> This PEP is somehow controversal. Some people fear that it would allow
> people to hack the Python language to write their own incompatible
> variant of Python. I don't think that my PEP adds anything new, it's
> already possible to do that, importlib made it even more easy. I used
> my FAT Python optimizer project to sell this PEP. Since FAT Python is
> also controversal (it hasn't been proved to be actually faster), the
> PEP didn't go far at my last attempt.
> Note: Is core-menthorship the best place for such performance
> discussion? :-) Maybe we should open a thread on python-dev@ or speed@
> mailing list.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev