Mailing List Archive

1 2 3 4  View All
Re: Speeding up CPython [ In reply to ]
On 22Oct2020 1341, Marco Sulla wrote:
> On Thu, 22 Oct 2020 at 14:25, Mark Shannon <mark@hotpy.org
> <mailto:mark@hotpy.org>> wrote:
>
> MSVC seems to do better jump fusion than GCC.
>
>
> Maybe I'm wrong, since I only take a look at dict, tuple and set C code,
> but it does not seems to me that there's more than 1-2 GOTOs in every
> CPython function, and they can't be merged.

There are vastly more jumps generated than what you see in the source
code. You'll need to compare assembly language to get a proper read on this.

But I don't think that's necessary, since processors do other kinds of
clever things with jumps anyway, that can variously improve/degrade
performance from what the compilers generate.

Benchmarks on consistent hardware are what matter, not speculation about
generated code.

Cheers,
Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/JEEZNIP4TPLIA2ZS3QIRWZGXBKPDOVBF/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
I don’t have much to add to this thread, except to ask whether Mark has been in contact with Carl Shapiro. Carl’s posted here before, but I don’t think he’s an active mailing list participant. Carl has a lot of experience with VMs and has been doing interesting work on performant Python implementations at Facebook. You might want to reach out to him.

Cheers,
-Barry
Re: Speeding up CPython [ In reply to ]
(For the record, I’m not replying as a PSF Director in this; I haven’t
discussed this with the rest of the Board yet. This just comes from the
Steering Council.)

The Steering Council discussed this proposal in our weekly meeting, last
week. It's a complicated subject with a lot of different facets to
consider. First of all, though, we want to thank you, Mark, for bringing
this to the table. The Steering Council and the PSF have been looking for
these kinds of proposals for spending money on CPython development. We need
ideas like this to have something to spend money on that we might collect
(e.g. via the new GitHub sponsors page), and also to have a good story to
potential (corporate) sponsors.

That said, we do have a number of things to consider here.

For background, funding comes in a variety of flavours. Most donations to
the PSF are general fund donations; the foundation is free to use it for
whatever purpose it deems necessary (within its non-profit mission). The
PSF Board and staff decide where this money has the biggest impact, as
there are a lot of things the PSF could spend it on.

Funds can also be earmarked for a specific purpose. Donations to PyPI (
donate.pypi.org) work this way, for example. The donations go to the PSF,
but are set aside specifically for PyPI expenses and development. Fiscal
sponsorship (https://www.python.org/psf/fiscal-sponsorees/) is similar, but
even more firmly restricted (and the fiscal sponsorees, not the PSF,
decides what to spend the money on).

A third way of handling funding is more targeted donations: sponsors donate
for a specific program. For example, GitHub donated money specifically for
the PSF to hire a project manager to handle the migration from
bugs.python.org to GitHub Issues. Ezio Melotti was contracted by the PSF
for this job, not GitHub, even though the funds are entirely donated by
GitHub. Similar to such targeted donations are grant requests, like the
several grants PyPI received and the CZI grant request for CPython that was
recently rejected (https://github.com/python/steering-council/issues/26).
The mechanics are a little different, but the end result is the same: the
PSF receives funds to achieve very specific goals.

Regarding donations to CPython development (as earmarked donations, or from
the PSF's general fund), the SC drew up a plan for investment that is
centered around maintenance: reducing the maintenance burden, easing the
load on volunteers where desired, working through our bug and PR backlog.
(The COVID-19 impact on PyCon and PSF funds put a damper on our plans, but
we used much of the original plan for the CZI grant request, for example.
Since that, too, fell through, we're hoping to collect funds for a reduced
version of the plan through the PSF, which is looking to add it as a
separate track in the sponsorship program.) Speeding up pure-Python
programs is not something we consider a priority at this point, at least
not until we can address the larger maintenance issues.

And it may not be immediately obvious from Mark's plans, but as far as we
can tell, the proposal is for speeding up pure-Python code. It will do
little for code that is hampered, speed-wise, by CPython's object model, or
threading model, or the C API. We have no idea how much this will actually
matter to users. Making pure-Python code execution faster is always
welcome, but it depends on the price. It may not be a good place to spend
$500k or more, and it may even not be considered worth the implementation
complexity.

Thinking specifically of corporate sponsorship, it's very much the question
if pure-Python code speedup is something companies would be willing to
invest serious funds in. Google's Unladen Swallow was such an investment,
and though it did deliver speedups (which were included in Python 2.7) and
even though Google has a lot of Python code, there was not enough interest
to keep it going. This may be different now, but finding out what
"customers" (in the broadest sense) actually want is an important first
step in asking for funding for a project like this. It's the kind of thing
normally done by a product manager, at least in the corporate world, and we
need that same effort and care put into it.

If we can potentially find the funds for this project, via the PSF's
general fund, earmarked funds or a direct corporate sponsor, we also have
to consider what we are actually delivering. Which performance metrics are
we improving? How are we measuring them, what benchmarks? What if the
sponsor has their own benchmarks they want to use? What about effects on
other performance metrics, ones the project isn't seeking to improve, are
they allowed to worsen? To what extent? How will that be measured? How will
we measure progress as the project continues? What milestones will we set?
What happens when there's disagreement about the result between the sponsor
and the people doing the work? What if the Steering Council or the core
developers -- as a body -- declines to merge the work even if it does
produce the desired result for the sponsor and the people doing the work?

And this is about more than just agreements between the sponsor and the
people doing the work. What is the position of the Steering Council in
this? Are they managing the people doing the work or not? Are they
evaluating the end result or not? What about the rest of the core
developers? And how will development take place? Will the design or
implementation of the performance improvements go through the PEP process?
Will the SC or other core developers have input in the design or
implementation? Who will do code review of the changes? Will the work be
merged in small increments, or will it happen in a separate branch until
the project is complete? All of these questions, and more, will need to be
answered in some way, and it really requires a project manager to take this
on. We've seen how much impact good management can have on a project with
the PyPI work overseen by Sumana. A project of this scale really can't do
without it.

I don't doubt all of these questions can be answered, but it's going to
take time and effort -- and probably concessions -- to get to a good
proposal to put before interested corporations, and then more adjustments
to accommodate them. The PSF and the SC can't fund the work at this time.
If we can find a sponsor willing to just shell out the $2M (or just $500k)
for the current plan, the SC is not against it -- but without the product
management and project management work mentioned above, I doubt this will
happen. If we want the SC or the PSF to go shopping for sponsors,
soliciting donations for this project, we need more of the product/project
management work done as well.

If people want to work on the product and project management part of the
proposal, that’d be great. We'd be happy to provide guidance. We also can
-- and will! -- certainly mention this proposal as the kind of work we
would want to fund when talking to potential sponsors. We can gauge
interest, to see how worthwhile it would be to flesh out the proposal. Who
knows, maybe someone will be willing to outright fund this as-is. But as it
is, the SC doesn't think we can fund this directly, even if we had the
money available.

For the SC,

Thomas.

--
Thomas Wouters <thomas@python.org>

Hi! I'm an email virus! Think twice before sending your email to help me
spread!
Re: Speeding up CPython [ In reply to ]
Hello,

On Wed, 4 Nov 2020 13:27:50 +0100
Thomas Wouters <thomas@python.org> wrote:
>
> And it may not be immediately obvious from Mark's plans, but as far as we
> can tell, the proposal is for speeding up pure-Python code. It will do
> little for code that is hampered, speed-wise, by CPython's object model, or
> threading model, or the C API. We have no idea how much this will actually
> matter to users. Making pure-Python code execution faster is always
> welcome, but it depends on the price. It may not be a good place to spend
> $500k or more, and it may even not be considered worth the implementation
> complexity.

FWIW, I think it would definitely be worth it. Performance will be a
*major* hurdle for Python in the years to come (the other hurdle being
ease of deployment).

> Thinking specifically of corporate sponsorship, it's very much the question
> if pure-Python code speedup is something companies would be willing to
> invest serious funds in.

I would suggest for example talking to Quansight, Numfocus, the NVidia
Rapids team, and/or coiled.io . There are areas of scientific computing
where better pure Python performance would help (one potential area is
the Dask scheduler, another is the Numba JIT compiler).

Another prominent area is server-side Web development, but I have noone
to suggest there :-)

Best regards

Antoine.

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/RCB5JE22QQRNYU76IDAKYCF3VYWHUDFZ/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
On Wed, 4 Nov 2020 at 13:14, Antoine Pitrou <solipsis@pitrou.net> wrote:
>
> On Wed, 4 Nov 2020 13:27:50 +0100
> Thomas Wouters <thomas@python.org> wrote:
> >
> > And it may not be immediately obvious from Mark's plans, but as far as we
> > can tell, the proposal is for speeding up pure-Python code. It will do
> > little for code that is hampered, speed-wise, by CPython's object model, or
> > threading model, or the C API. We have no idea how much this will actually
> > matter to users. Making pure-Python code execution faster is always
> > welcome, but it depends on the price. It may not be a good place to spend
> > $500k or more, and it may even not be considered worth the implementation
> > complexity.
>
> FWIW, I think it would definitely be worth it. Performance will be a
> *major* hurdle for Python in the years to come (the other hurdle being
> ease of deployment).

I agree on both of these points, and I would love to see funding be
available for both of these items.

But having said that, I agree with the SC's position here. Getting
funding is only one part of the problem, project management and
co-ordination is absolutely necessary (we're talking about a $2M
project!) and would be a significant overhead. Even if the cost of
such resource could come from the funding, there's still a significant
cashflow problem with committing that resource prior to getting
funding, as well as a risk that the funding doesn't materialise and
the investment is lost.

I hope that we can find some way to realise the benefits Mark has
identified, but I can see why the SC has to prioritise the way they
have.

Paul
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/4NY6QKSD7375B24EM3MBI4HDHDGQRIB7/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
Hi Thomas,

I have to assume that this isn't a rejection of my proposal, since I
haven't actually made a proposal to the SC yet :)

Thanks for the feedback though, it's very valuable to know the SC's
thinking on this matter.

I have a few comments inline below.


On 04/11/2020 12:27 pm, Thomas Wouters wrote:
>
> (For the record, I’m not replying as a PSF Director in this; I haven’t
> discussed this with the rest of the Board yet. This just comes from the
> Steering Council.)
>
>
> The Steering Council discussed this proposal in our weekly meeting, last
> week. It's a complicated subject with a lot of different facets to
> consider. First of all, though, we want to thank you, Mark, for bringing
> this to the table. The Steering Council and the PSF have been looking
> for these kinds of proposals for spending money on CPython development.
> We need ideas like this to have something to spend money on that we
> might collect (e.g. via the new GitHub sponsors page), and also to have
> a good story to potential (corporate) sponsors.
>
>
> That said, we do have a number of things to consider here.
>
>
> For background, funding comes in a variety of flavours. Most donations
> to the PSF are general fund donations; the foundation is free to use it
> for whatever purpose it deems necessary (within its non-profit mission).
> The PSF Board and staff decide where this money has the biggest impact,
> as there are a lotof things the PSF could spend it on.
>
>
> Funds can also be earmarked for a specific purpose. Donations to PyPI
> (donate.pypi.org <http://donate.pypi.org>) work this way, for example.
> The donations go to the PSF, but are set aside specifically for PyPI
> expenses and development. Fiscal sponsorship
> (https://www.python.org/psf/fiscal-sponsorees/) is similar, but even
> more firmly restricted (and the fiscal sponsorees, not the PSF, decides +++
> what to spend the money on).
>
>
> A third way of handling funding is more targeted donations: sponsors
> donate for a specific program. For example, GitHub donated money
> specifically for the PSF to hire a project manager to handle the
> migration from bugs.python.org <http://bugs.python.org> to GitHub
> Issues. Ezio Melotti was contracted by the PSF for this job, not GitHub,
> even though the funds are entirely donated by GitHub. Similar to such
> targeted donations are grant requests, like the several grants PyPI
> received and the CZI grant request for CPython that was recently
> rejected (https://github.com/python/steering-council/issues/26). The
> mechanics are a little different, but the end result is the same: the
> PSF receives funds to achieve very specific goals.

I really don't want to take money away from the PSF. Ideally I would
like the PSF to have more money.

>
>
> Regarding donations to CPython development (as earmarked donations, or
> from the PSF's general fund), the SC drew up a plan for investment that
> is centered around maintenance: reducing the maintenance burden, easing
> the load on volunteers where desired, working through our bug and PR
> backlog. (The COVID-19 impact on PyCon and PSF funds put a damper on our
> plans, but we used much of the original plan for the CZI grant request,
> for example. Since that, too, fell through, we're hoping to collect
> funds for a reduced version of the plan through the PSF, which is
> looking to add it as a separate track in the sponsorship program.)
> Speeding up pure-Python programs is not something we consider a priority
> at this point, at least not until we can address the larger maintenance
> issues.

I too think we should improve the maintenance story.
But maintenance doesn't get anyone excited. Performance does.
By allocating part of the budget to maintenance we get performance *and*
a better maintenance story. That's my goal anyway.

I think it is a lot easier to say to corporations, give us X dollars to
speed up Python and you save Y dollars, than give us X dollars to
improve maintenance with no quantifiable benefit to them.

>
>
> And it may not be immediately obvious from Mark's plans, but as far as
> we can tell, the proposal is for speeding up pure-Python code. It will
> do little for code that is hampered, speed-wise, by CPython's object
> model, or threading model, or the C API. We have no idea how much this
> will actually matter to users. Making pure-Python code execution faster
> is always welcome, but it depends on the price. It may not be a good
> place to spend $500k or more, and it may even not be considered worth
> the implementation complexity.

I'll elaborate:

1. There will be a large total diff, but not that large an increase in
code size; less than 1% of the current size of the C code base.

There would be an increase in the conceptual complexity of the interpreter,
but I'm hoping to largely offset that with better code organization.

It is perfectly possible to *improve* code quality,
if not necessarily size, while increasing performance.
Simpler code is often faster and better algorithms do not make worse code.

2. The object model and C-API are an inherent part of CPython. It's not
really meaningful to say that some piece of code's performance is
hampered by the C-API or object model. What matters is how much faster
it goes.

3. Regarding threading, all CPU bound code will be speed up.
Whether code is limited by being single threaded or not, it will still
be sped up.
The speed up of a single interpreter is (largely) independent of the
number of threads running. Eric, Petr and Victor's work will still be
relevant for concurrent performance.

Please, just ask me if you need more details on any of these points.

>
>
> Thinking specifically of corporate sponsorship, it's very much the
> question if pure-Python code speedup is something companies would be
> willing to invest serious funds in. Google's Unladen Swallow was such an
> investment, and though it did deliver speedups (which were included in
> Python 2.7) and even though Google has a lotof Python code, there was
> not enough interest to keep it going. This may be different now, but
> finding out what "customers" (in the broadest sense) actually want is an
> important first step in asking for funding for a project like this. It's
> the kind of thing normally done by a product manager, at least in the
> corporate world, and we need that same effort and care put into it.

It makes sense that a single corporate sponsor would be unwilling to
fund this. But why not several corporations? It keeps their costs down
and they get the same benefit.
I have no idea how to go about organizing that, however.

>
>
> If we canpotentially find the funds for this project, via the PSF's
> general fund, earmarked funds or a direct corporate sponsor, we also
> have to consider what we are actually delivering. Which performance
> metrics are we improving? How are we measuring them, what benchmarks?
> What if the sponsor has their own benchmarks they want to use? What
> about effects on other performance metrics, ones the project isn't
> seeking to improve, are they allowed to worsen? To what extent? How will
> that be measured? How will we measure progress as the project continues?
> What milestones will we set? What happens when there's disagreement
> about the result between the sponsor and the people doing the work? What
> if the Steering Council or the core developers -- as a body -- declines
> to merge the work even if it does produce the desired result for the
> sponsor and the people doing the work?

We already have a standard benchmark suite. I would propose using that
as a start.

If corporate sponsors want to add their own benchmarks that's a double
win. They get more confidence that they will see performance
improvements and we get a more comprehensive benchmark suite.

I wouldn't worry about anything getting slower.
But, if a sponsor only sees a 20% speedup on their code, despite a
general speed up of 50%, then what happens? I guess that's up to the
sponsor, although they probably should state their conditions up front.


>
>
> And this is about more than just agreements between the sponsor and the
> people doing the work. What is the position of the Steering Council in
> this? Are they managing the people doing the work or not? Are they
> evaluating the end result or not? What about the rest of the core
> developers? And how will development take place? Will the design or
> implementation of the performance improvements go through the PEP
> process? Will the SC or other core developers have input in the design
> or implementation? Who will do code review of the changes? Will the work
> be merged in small increments, or will it happen in a separate branch
> until the project is complete? All of these questions, and more, will
> need to be answered in some way, and it really requires a project
> manager to take this on. We've seen how much impact good management can
> have on a project with the PyPI work overseen by Sumana. A project of
> this scale really can't do without it.

I don't think that the SC or PSF should be managing the work. How
do you price and allocate research work?

Which is why I am offering to subcontract.
I am willing to take on the risk and, having done the research, know
that I can deliver.

As for reviewing and merging, I would expect to pay someone for
reviewing and some other maintenance tasks. Note that the payment would
be for the review, not for a favorable review.
Obviously reviews from other code devs would be most welcome, but I
don't want to rely on using up other people's spare time.

I can merge the code myself.

Merges would be in small units and as often as is practical.
There is no need for long lived branches, at least not for stage 1.

>
>
> I don't doubt all of these questions can be answered, but it's going to
> take time and effort -- and probably concessions -- to get to a good
> proposal to put before interested corporations, and then more
> adjustments to accommodate them. The PSF and the SC can't fund the work
> at this time. If we can find a sponsor willing to just shell out the $2M
> (or just $500k) for the current plan, the SC is not against it -- but
> without the product management and project management work mentioned
> above, I doubt this will happen. If we want the SC or the PSF to go
> shopping for sponsors, soliciting donations for this project, we need
> more of the product/project management work done as well.

Just the $500k, or thereabouts. The first stage should not rely on later
stages ever happening.

As for project management, that's why I was suggested a cash-on-delivery
contract.
Obviously whoever gets hired by the PSF for maintenance will need
managing, but that needs to happen anyway.

>
>
> If people want to work on the product and project management part of the
> proposal, that’d be great. We'd be happy to provide guidance. We also
> can -- and will! -- certainly mention this proposal as the kind of work
> we would want to fund when talking to potential sponsors. We can gauge
> interest, to see how worthwhile it would be to flesh out the proposal.
> Who knows, maybe someone will be willing to outright fund this as-is.
> But as it is, the SC doesn't think we can fund this directly, even if we
> had the money available.

Again, I really don't want to take money away from the PSF.

Cheers,
Mark.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/MZY56D4TTOWZHYHYCCAFQUNO3JKXZRKS/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
Hello Everyone,

I´m very curious about this proposal, but unfortunately it has been a
while since I heard any news about this project.
Does anyone know what happened?

Best Regards,
Bruno
Re: Speeding up CPython [ In reply to ]
On 1/24/2021 6:09 PM, Bruno Cabral wrote:
> Hello Everyone,
>
> I´m very curious about this proposal, but unfortunately it has been a
> while since I heard any news about this project.
> Does anyone know what happened?

The Python Software Foundation currently has a shortfall of funds rather
than a surplus.


--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/ILJPVZF3F2ERITJ3FAWBORY2A7VKBYGX/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
On Mon, Jan 25, 2021 at 1:30 AM Terry Reedy <tjreedy@udel.edu> wrote:
> The Python Software Foundation currently has a shortfall of funds rather
> than a surplus.

I believe Mark's proposal suggested raising money specifically for the
project, not spending general PSF funds.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/CULJ7Z5M5CDO5DODF3D4EVKETT3VQXK7/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
On Tue, Oct 20, 2020 at 01:53:34PM +0100, Mark Shannon 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.

I've noticed a lot of optimization-related b.p.o. issues created by
Mark, which is great. What happened with Mark's proposal here? Did the
funding issue get sorted?


--
Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/6ZVJ5ZJC2BXUUSI3JTGOU4MQXQHORI4Q/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
On Fri, May 7, 2021 at 6:51 PM Steven D'Aprano <steve@pearwood.info> wrote:

> On Tue, Oct 20, 2020 at 01:53:34PM +0100, Mark Shannon 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.
>
> I've noticed a lot of optimization-related b.p.o. issues created by
> Mark, which is great. What happened with Mark's proposal here? Did the
> funding issue get sorted?
>

I believe Guido has Mark contracting on Python performance through
Microsoft?

-Greg
Re: Speeding up CPython [ In reply to ]
On Fri, May 7, 2021 at 8:20 PM Gregory P. Smith <greg@krypto.org> wrote:

>
> On Fri, May 7, 2021 at 6:51 PM Steven D'Aprano <steve@pearwood.info>
> wrote:
>
>> On Tue, Oct 20, 2020 at 01:53:34PM +0100, Mark Shannon 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.
>>
>> I've noticed a lot of optimization-related b.p.o. issues created by
>> Mark, which is great. What happened with Mark's proposal here? Did the
>> funding issue get sorted?
>>
>
> I believe Guido has Mark contracting on Python performance through
> Microsoft?
>

For those who didn't attend the Language Summit yesterday, this is indeed
the case. We've been in stealth mode until the summit, but the cat is now
definitely out of the bag -- Microsoft is thanking the Python community by
funding work to speed up CPython. Besides Mark and myself, Eric Snow (a MS
employee like myself) is also full-time on this project. We expect to be
adding a few more people to the team.

Mark has already revealed his PEP 659 (Specializing Adaptive Interpreter).

We've also created a small GitHub org: https://github.com/faster-cpython/,
containing several repos:

- https://github.com/faster-cpython/cpython, a fork of cpython where we do
the work (PRs will mostly come from here)
- https://github.com/faster-cpython/tools, a set of tools we're using for
benchmarking and analysis and the like (the README contains some stats
we've gathered on bytecode occurrence)
- https://github.com/faster-cpython/ideas, a tracker where we're discussing
various plans and ideas

Contributions are welcome!

I've also published the slides of my language summit presentation:
https://github.com/faster-cpython/ideas/blob/main/FasterCPythonDark.pdf

--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
Re: Speeding up CPython [ In reply to ]
Great news, just a tiny bit from me.
I read the other day in the OpenSource report
sponsored by the Ford Foundation a CPython
contributor stating that we have an all time high
count of Python users but an all time low number of
contributors to CPython. I don't know how but
we certainly need a fake path to help people start
contributing and level up to gain a pool of resources
We don't need to wait for easy issues or things like
that or wait for PR merge to level up.

Yet you always see it: new people not knowing where to start,
highly skilled contributors drowning and
intermediate contributors moving slowly

I know all contributors are doing awesome
work but maybe something can be done to have
a smarter skilling up stream
Re: Speeding up CPython [ In reply to ]
On 5/12/2021 2:50 PM, Abdur-Rahmaan Janhangeer wrote:
> Great news, just a tiny bit from me.
> I read the other day in the OpenSource report
> sponsored by the Ford Foundation a CPython
> contributor stating that we have an all time high
> count of Python users but an all time low number of
> contributors to CPython. I don't know how but
> we certainly need a fake path to help people start

I presume you mean 'fast path'?

> contributing and level up to gain a pool of resources
> We don't need to wait for easy issues or things like
> that or wait for PR merge to level up.
>
> Yet you always see it: new people not knowing where to start,
> highly skilled contributors drowning and
> intermediate contributors moving slowly

I have multiple times strongly recommended that people review issues and
PRs, and sometimes given details, but most won't or don't. Do you have
any idea why?

--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/TXDU2Q4D2BA2MGHXBGDP4VI452NSCVDB/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
On Wed, 12 May 2021 17:05:03 -0400
Terry Reedy <tjreedy@udel.edu> wrote:
>
> > contributing and level up to gain a pool of resources
> > We don't need to wait for easy issues or things like
> > that or wait for PR merge to level up.
> >
> > Yet you always see it: new people not knowing where to start,
> > highly skilled contributors drowning and
> > intermediate contributors moving slowly
>
> I have multiple times strongly recommended that people review issues and
> PRs, and sometimes given details, but most won't or don't.

I don't know who "people" are in your sentence, but reviewing issues
and PRs generally requires a high familiarity with a project, and
enough confidence to speak with a voice of (seeming) authority. I'm
not convinced it's generally easier than submitting a patch for a
particular issue you're comfortable with.

Regards

Antoine.


_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/MLRH6CZFPXIBVPUKF2GRTZDDUN2NACNL/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
On 5/12/2021 5:14 PM, Antoine Pitrou wrote:
> On Wed, 12 May 2021 17:05:03 -0400
> Terry Reedy <tjreedy@udel.edu> wrote:

>>> Yet you always see it: new people not knowing where to start,
>>> highly skilled contributors drowning and
>>> intermediate contributors moving slowly
>>
>> I have multiple times strongly recommended that people review issues and
>> PRs, and sometimes given details, but most won't or don't.
>
> I don't know who "people" are in your sentence, but reviewing issues
> and PRs generally requires a high familiarity with a project, and

Much can be done without what I think you mean by 'high familiarity'.

Bug issues:
bpo: "On macOS with 3.8.3 I see this buggy behavior" If not enough
info to reproduce, ask for it. If there is, try to reproduce on lastest
release or even better, repository build. Sometimes, trying on a
different OS is helpful.
PR: make local PR branch and test whether proposed fix works.

Enhancement issues:
bpo: if proposal is for core python or a module one has used, does
proposal seem like an actual improvement? enough to be worth the likely
bother?
PR: does the PR work as promised? Do you like it?

PR Python code: read it. See any possible improvements?

> enough confidence to speak with a voice of (seeming) authority.

I prefer honesty to pretend authority. Nearly 2 years ago, a 'new
contributor' commented on a IDLE PR, "Would x be better?" It was a minor
improvement, but a real one, so I made it, thanked the person, and
encouraged further efforts. That person did so and is now a core developer.

I would welcome more eyes on IDLE patches and use testing thereof.

> I'm
> not convinced it's generally easier than submitting a patch for a
> particular issue you're comfortable with.

Some review actions are easier, some are not. But the only way to learn
to review other people's code is to do it, and it is a skill we need in
at least some new coredevs.

--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/EKUEY6FZNUNYLJB2RDMH7JMLBIQ2FQXO/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
On Thu, 13 May 2021, 01:09 Terry Reedy, <tjreedy@udel.edu> wrote:

> On 5/12/2021 2:50 PM, Abdur-Rahmaan Janhangeer wrote:
> > Great news, just a tiny bit from me.
> > I read the other day in the OpenSource report
> > sponsored by the Ford Foundation a CPython
> > contributor stating that we have an all time high
> > count of Python users but an all time low number of
> > contributors to CPython. I don't know how but
> > we certainly need a fake path to help people start
>
> I presume you mean 'fast path'?
>


No i mean fake path in the sense of a fork
of CPython with issues for learning purposes
Then people work on solving the issues on their
own without PRing. It helps them get close to the
CPython source without waiting for merges or
comments since the fix will be documented.

It allows people to skill up without people involvement
Re: Speeding up CPython [ In reply to ]
On Wed, May 12, 2021 at 8:51 PM Abdur-Rahmaan Janhangeer <
arj.python@gmail.com> wrote:

> Great news, just a tiny bit from me.
> I read the other day in the OpenSource report
> sponsored by the Ford Foundation a CPython
> contributor stating that we have an all time high
> count of Python users but an all time low number of
> contributors to CPython.
>

There's also (probably, I didn't count myself) a record number of Python
implementations that are not CPython (including Cython, Pythran and similar
projects) as well as CPython forks (Pyjion, Pyston, the project announced
by Guido, etc.)

Also: judging from https://github.com/python/cpython/graphs/contributors,
the "all time low number of contributors to CPython" assertion doesn't seem
to hold. In terms of committers, and according to this page, I count a
similar number or slightly higher of committers (50+) over the last year,
similar to over previous years (including those that seem more active in
terms of commit counts on the graph, like around 2010).

S.

--
Stefane Fermigier - http://fermigier.com/ - http://twitter.com/sfermigier -
http://linkedin.com/in/sfermigier
Founder & CEO, Abilian - Enterprise Social Software -
http://www.abilian.com/
Chairman, National Council for Free & Open Source Software (CNLL) -
http://cnll.fr/
Founder & Organiser, PyParis & PyData Paris - http://pyparis.org/ &
http://pydata.fr/
Re: Speeding up CPython [ In reply to ]
Actual quote by "a Python Software Foundation fellow and contrib-
utor to Python infrastructure projects"

What frustrates me most is that we have an all-time high of
Python developers and an all-time low on high quality contri-
butions.[...] As soon as pivotal developers like Armin Ronacher
slow down their churn, the whole community feels it immedi-
ately. The moment Paul Kehrer stops working on PyCA we’re
screwed. If Hawkowl stops porting, Twisted will never be on
Python 3 and git.
So we’re bleeding due to people who cause more work than they
provide. [...] Right now everyone is benefitting from what has
been built but due to lack of funding and contributions it’s
deteriorating. I find that worrying, because Python might be
super popular right now but once the consequences hit us, the
opportunists will leave as fast as they arrived

Book: ROADS AND BRIDGES: THE UNSEEN LABOR BEHIND OUR DIGITAL INFRASTRUCTURE
Link, Page 76 link:
https://www.fordfoundation.org/media/2976/roads-and-bridges-the-unseen-labor-behind-our-digital-infrastructure.pdf

>
Re: Speeding up CPython [ In reply to ]
On Thu, May 13, 2021 at 8:42 AM Abdur-Rahmaan Janhangeer <
arj.python@gmail.com> wrote:

> Actual quote by "a Python Software Foundation fellow and contrib-
> utor to Python infrastructure projects"
>

Ah, this is what you were referring to. The document was published 5 years
ago, so this may or may not reflect the current situation.


> What frustrates me most is that we have an all-time high of
> Python developers and an all-time low on high quality contri-
> butions.[...] As soon as pivotal developers like Armin Ronacher
> slow down their churn, the whole community feels it immedi-
> ately.
>

That's true, but, AFAIK, Armin was never a direct contributor to CPython
(confirmed by looking at
https://github.com/python/cpython/graphs/contributors ) so I guess that's
another issue.


But to add a specific comment on this topic: Armin was indeed a very
creative and prolific developer of Python libraries and frameworks, and
since he's mostly left the Python world this has been an issue indeed. Some
of his projects, like Lektor (which I'm using for my blog) have lost their
traction and some of their users are moving to other tools.

But the good news is that some of his projects have been picked up by other
contributors, as the "Pallets" project, and, as a coincidence, they have
made major new releases of most of Armin's old projects just a couple of
days ago: https://www.palletsprojects.com/blog/flask-2-0-released/

S.

>

--
Stefane Fermigier - http://fermigier.com/ - http://twitter.com/sfermigier -
http://linkedin.com/in/sfermigier
Founder & CEO, Abilian - Enterprise Social Software -
http://www.abilian.com/
Chairman, National Council for Free & Open Source Software (CNLL) -
http://cnll.fr/
Founder & Organiser, PyParis & PyData Paris - http://pyparis.org/ &
http://pydata.fr/
Re: Speeding up CPython [ In reply to ]
Greetings,

One crucial missing piece in the Python world is the focus
on internals of projects. You have many talks on usage and
scaling but not enough on internals. Even less workshops.
For OpenSource to thrive, you need people who master the codebase.
It's a long process. You get there by having core contributors over
time. How does a contributor becomes a core one? By getting the feet wet
into the codebase and tackling more difficult as time passes. That's why
instead of waiting for people to find issues, work on it, wait for
validation,
we can improve the training process without damage to the codebase.
People get the educational version of the repo, solve the issues at their
own pace up to the level where they'll feel confident to try a meaningful
PR. Seeing it with the eye of a knowledgeable person makes will make them
PR not just for the sake of PR but because of a real need. One practical
way is also to point the intermediate steps to resources on the internet,
like
this and that C articles to get started with C, this article to understand
this C
behaviour, this talk at this conf to understand this part of the C API, i
built a
tool specifically to document those intermediate steps by gathering
resources
on the internet, will start using it soon: https://linkolearn.com/. I am
part of the
Flask Community Workgroup (It's due to be announced soon, but here is the
link:
https://flaskcwg.github.io/). One of the aims of it is education, a good
deal about
internals. We aim to roll out some initiatives by next year. What caused me
to
write the first post is that there seems to be a bottleneck somewhere when
you
see contributors overwhelmed by OpenSource tasks. If it were some obscure
project
I understand but not one of the most popular OpenSource product of today.

Kind Regards,

Abdur-Rahmaan Janhangeer
about <https://compileralchemy.github.io/> | blog
<https://www.pythonkitchen.com>
github <https://github.com/Abdur-RahmaanJ>
Mauritius
Re: Speeding up CPython [ In reply to ]
On Thu, May 13, 2021 at 5:37 PM Abdur-Rahmaan Janhangeer
<arj.python@gmail.com> wrote:
>
> Greetings,
>
> One crucial missing piece in the Python world is the focus
> on internals of projects. You have many talks on usage and
> scaling but not enough on internals. Even less workshops.
> For OpenSource to thrive, you need people who master the codebase.
> It's a long process. You get there by having core contributors over
> time. How does a contributor becomes a core one? By getting the feet wet
> into the codebase and tackling more difficult as time passes. That's why
> instead of waiting for people to find issues, work on it, wait for validation,
> we can improve the training process without damage to the codebase.
> People get the educational version of the repo, solve the issues at their
> own pace up to the level where they'll feel confident to try a meaningful
> PR. Seeing it with the eye of a knowledgeable person makes will make them
> PR not just for the sake of PR but because of a real need.

How is this "educational version" different from a forked git
repository? I'm confused here.

ChrisA
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/N2BUH2MHDTPERNA4TLCXQOL5KQ5FFL3D/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Speeding up CPython [ In reply to ]
Greetings,

On Thu, May 13, 2021 at 11:43 AM Chris Angelico <rosuav@gmail.com> wrote:

> How is this "educational version" different from a forked git
> repository? I'm confused here.
>

Oh i mean a forked git repository with internal-focused documentations,
issues
opened with description of changes to be made then repo set to READONLY.
A way to view what the solved issues look like in included under
'internal-focused documentations'

Kind Regards,

Abdur-Rahmaan Janhangeer
about <https://compileralchemy.github.io/> | blog
<https://www.pythonkitchen.com>
github <https://github.com/Abdur-RahmaanJ>
Mauritius
Re: Speeding up CPython [ In reply to ]
Have you heard of this book? It's an excellent companion to the source code.

https://realpython.com/products/cpython-internals-book/

On Thu, May 13, 2021 at 12:30 AM Abdur-Rahmaan Janhangeer <
arj.python@gmail.com> wrote:

> Greetings,
>
> One crucial missing piece in the Python world is the focus
> on internals of projects. You have many talks on usage and
> scaling but not enough on internals. Even less workshops.
> For OpenSource to thrive, you need people who master the codebase.
> It's a long process. You get there by having core contributors over
> time. How does a contributor becomes a core one? By getting the feet wet
> into the codebase and tackling more difficult as time passes. That's why
> instead of waiting for people to find issues, work on it, wait for
> validation,
> we can improve the training process without damage to the codebase.
> People get the educational version of the repo, solve the issues at their
> own pace up to the level where they'll feel confident to try a meaningful
> PR. Seeing it with the eye of a knowledgeable person makes will make them
> PR not just for the sake of PR but because of a real need. One practical
> way is also to point the intermediate steps to resources on the internet,
> like
> this and that C articles to get started with C, this article to understand
> this C
> behaviour, this talk at this conf to understand this part of the C API, i
> built a
> tool specifically to document those intermediate steps by gathering
> resources
> on the internet, will start using it soon: https://linkolearn.com/. I am
> part of the
> Flask Community Workgroup (It's due to be announced soon, but here is the
> link:
> https://flaskcwg.github.io/). One of the aims of it is education, a good
> deal about
> internals. We aim to roll out some initiatives by next year. What caused
> me to
> write the first post is that there seems to be a bottleneck somewhere when
> you
> see contributors overwhelmed by OpenSource tasks. If it were some obscure
> project
> I understand but not one of the most popular OpenSource product of today.
>
> Kind Regards,
>
> Abdur-Rahmaan Janhangeer
> about <https://compileralchemy.github.io/> | blog
> <https://www.pythonkitchen.com>
> github <https://github.com/Abdur-RahmaanJ>
> Mauritius
>


--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
Re: Speeding up CPython [ In reply to ]
Abdur-Rahmaan Janhangeer writes:

> No i mean fake path in the sense of a fork
> of CPython with issues for learning purposes

*Creating* plausible issues is hard work, I assure you as a university
professor. Coming up with "exercises" that are not makework requires
expertise in both the domain and in educational psychology. (Some
people are "just good at it", of course, but it's quite clear from
popular textbooks that most are not.) I think that would be a very
unproductive use of developer time, especially since "git clone; git
checkout some-tag-in-2017" is pretty much what you're asking for
otherwise.

> Then people work on solving the issues on their
> own without PRing.

The problem is not a lack of issues to practice on. It's that (1) the
PR process itself is a barrier, or at least an annoyance, and (2) many
new contributors need mentoring. (Or think they do. Some just need
encouragment, others need help on technique, but both groups are more
or less blocked without the mentoring.)

And, of course, real contribution involves a lot of unfun work.
Writing tests, writing documentation, explaining to other developers
who start out -1 because they don't get it, overcoming your own mental
blocks to changing your submission because *you* don't get it, and on
and on. A lot of newcomers think "I'm not good at that, if I have to
do it I can't contribute" (and a few selfishly think they can just do
the fun parts and achieve fame and fortune), but you know, "if not
you, then who? If you don't do it for Python, where are you going to
be able to contribute?"

To be honest, although I'm not a specialist in organizational behavior
and am operating with a small sample, I can say that from the point of
view of identifying tasks, finding solutions, and implementing them,
Python is the most effective non-hierarchical organization I've ever
seen. I can't say I've seen more than one or two hierarchical
organizations that are significantly better at implementing solutions
and don't burn up their workers in the process -- and the ones I'm
thinking of are way smaller than Python. (Yes, I know that there are
people who have gotten burned up in Python, too. We can do better on
that, but Python does not deliberately sacrifice people to the
organization.)

ISTM that Terry is right. What we need to do better is encourage
people to just start contributing, and help them to get over the
initial humps: git, the PR process, requests from the QA police for
docs and tests and NEWS entries, etc. Terry's approach seems good to
me on the face of it, and it's "battle-tested". Terry uses it and has
had some successes. Maybe that process can be tweaked, but it's a
good recipe.

I suspect that the main reason it doesn't work for Terry outside of
IDLE is that IDLE is where Terry has expertise and motivation to do
emotional work: handholding at the beginning, deeper involvement in
mentoring as necessary. *And that's as it should be.* It's up to the
rest of us to do that work on areas *we* care about.

I have to point out that there's a whole crew over on corementorship
doing this work, and at least one Very Senior Developer with their own
private mentoring program.[1] IMO, that is a big part of why Python
is as successful as it is. If more senior developers would take on
these tasks it would have a big effect downstream. But emotional work
is hard, and it comes in big chunks. In many situations you have to
follow through, on the mentee's schedule, or the mentee will "slip the
hook and swim away." So it's a big ask. I'm willing to make that ask
in the abstract, but there's not even one senior developer I'm able to
point to and say "definitely that person would do more for Python by
mentoring than by hacking". It's a very hard problem.

Footnotes:
[1] Why "private"? Well, why should the junior developers have all
the fun? The VSDs want to hack too! So those programs are small and
not terribly well-publicized (and they often have strong "inclusion"
focuses as well as specific focus on areas of improvement).

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/VZVIARBQRT3UGOY5RLJB35MUXWGLDYD5/
Code of Conduct: http://python.org/psf/codeofconduct/

1 2 3 4  View All