On Tue, Dec 10, 2019 at 4:56 AM Mark Shannon <m...@hotpy.org> wrote:
>
>
> On 09/12/2019 2:15 pm, Chris Angelico wrote:
> > On Tue, Dec 10, 2019 at 1:09 AM Mark Shannon <m...@hotpy.org> wrote:
> >> Bear in mind that the costs of higher limits are paid by everyone, but
> >> the benefits are gained by few.
> >
> > Can we get some stats on what the costs of higher limits (or having no
> > limit at all) is? Or, putting it the other way: Since CPython
> > currently does not enforce limits, what are the benefits of placing
> > those limits? Merely having a limit doesn't in itself give a benefit
> > (and is a (minor) cost); it would help the discussion if we knew
> > exactly WHAT the costs of the higher limits were.
>
> Given there is an infinite number of potential optimizations that it
> would enable, it is a bit hard to put a number on it :)

Then pick one optimization and show us what it can do. Let's say you
pick "1,000,000 lines in a single source file", and show that this
limit (or rather, changing code to *assume* this limit) improves the
performance of, say, printing of tracebacks. A few benchmarks showing
how small files benefit from the banning of gigantic files would be
extremely helpful.

> It is also impossible to put precise numbers on the speedups of a
> particular optimizations unless it is implemented. I suspect no one is
> going to do that unless paid to do so, or are guaranteed that the work
> won't be thrown away because the PEP is rejected.

Fair, but even imprecise numbers would be extremely helpful. At the
moment, what we have is (paraphrased):

You: "We should limit things. Stuff will be faster."
Others: "Really? Because bit masking is work. It'll be slower."
You: "Maybe we limit it somewhere else, whatever. It'll be faster."
Others: "Will it? How much faster?"
You: "It'll be faster."

I'm not asking you to prove that CPython 3.9 could be exactly 7.183%
faster with these changes, just some indication that this will
actually improve things. You've asked us to say what we believe is "an
acceptable cost in memory or runtime", but at the moment, we're not
paying ANY cost or getting ANY benefit, so it's really hard to
randomly guess at things.

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/J6VCCAIMUWM3L2H63TECFVF5OOHUSOFA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to