Hi Chris,

On 20/10/2020 4:37 pm, Chris Angelico wrote:
On Wed, Oct 21, 2020 at 12:03 AM Mark Shannon <m...@hotpy.org> wrote:

Hi everyone,

CPython is slow. We all know that, yet little is done to fix it.

I'd like to change that.
I have a plan to speed up CPython by a factor of five over the next few
years. But it needs funding.


The overall aim is to speed up CPython by a factor of (approximately) five. We 
aim to do this in four distinct stages, each stage increasing the speed of 
CPython by (approximately) 50%.


This is a very bold estimate. Particularly, you're proposing a number
of small tweaks in stage 2 and expecting that (combined) they can give
a 50% improvement in overall performance?

20 tweaks each providing a 2% is a 49% speedup.
Stage 1 will open up optimizations that are currently worthwhile.


Do you have any details to back this up? You're not just asking for a
proposal to be accepted, you're actually asking for (quite a bit of)
money, and then hoping to find a contractor to do the actual work.

I am offering to do the work.

That means you're expecting that anyone would be able to achieve this,
given sufficient development time.
No, I can (with paid help) achieve this.
What matters is that someone can, not that anyone can.


BIG BIG concern: You're basically assuming that all this definition of
performance is measured for repeated executions of code. That's how
PyPy already works, and it most often suffers quite badly in startup
performance to make this happen. Will your proposed changes mean that
CPython has to pay the same startup costs that PyPy does?

Could you clarify what you think I'm assuming?

When you say start up, do you mean this?

$ time python3 -S -c ""

real    0m0.010s

$ time pypy -S -c ""

real    0m0.017s

No, there would be no slower startup. In fact the tier 0 interpreter should start a fraction faster than 3.9.


What would happen if $2M were spent on improving PyPy3 instead?

The PSF loses $1M to spend on CPython maintenance, to start with.

What would happen to PyPy? I have no idea.

Partial success of speeding up CPython is very valuable.
Partial success in getting PyPy to support C extensions well and perform well when it currently does, is much less valuable.

CPython that is "only" 2 or 3 times faster is a major improvement, but a PyPy that supports 80% of the C extensions that it currently does not is still not a replacement for CPython.


Cheers,
Mark.


ChrisA
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/3NBP3KLTMXNDJ2ME4QPSATW2ZIMKVICG/
Code of Conduct: http://python.org/psf/codeofconduct/

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/575BK2RBWDGXL4DNRJO5AM3GLXRCH45Q/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to