On Wed, Jul 22, 2020 at 8:51 PM Antoine Pitrou <solip...@pitrou.net> wrote:
>
> >
> > I don't think all attempts are failed.  Note that current CPython includes
> > some optimization already.
>
> The set of compile-time optimizations has almost not changed since at
> least 15 years ago.
>

Constant folding is rewritten and unused constants are removed from co_consts.
That's one of what Victor did his project.

> > And I think there are some potential optimization if we can limit some
> > debugging/introspecting features, like some C variables are "optimzed away"
> > in gdb when
> > we use -O option.
>
> You can think it, but where's the proof?  Or at least the design
> document for these optimizations?  How do you explain that Victor's
> attempt at static optimization failed?
>

I have some opinion about it (especially, PHP 7.x achieved significant
performance improvement without JIT. I envy it.).
But I don't have time to prove it, and it is too off topic because it
is not related to precise line number. Please forget what I said about
blocking future optimization.

My idea was just merging code blocks, but it is not worth enough. And
it is not related to execution speed.

On the other hand, if we can not remove lnotab, it is still
considerable to avoid having two lnotabs in -O mode.
Memory overhead of lnotab is not negligible.

Regards,
-- 
Inada Naoki  <songofaca...@gmail.com>
_______________________________________________
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/5T6ORCSTFS4EBQTYB7XLUJZ37C2WZECP/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to