On 22/07/2020 11:42 am, Inada Naoki wrote:
On Wed, Jul 22, 2020 at 6:12 PM Antoine Pitrou <solip...@pitrou.net <mailto:solip...@pitrou.net>> wrote:
 >
 > >
 > > But if we merge two equal code blocks, we can not produce precise line
 > > numbers, can we?
 > > Is this inconsistent microoptimization that real optimization harder?
 > > This optimization must be prohibited in future Python?
 >
 > All attempts to improve Python performance by compile-time
 > bytecode optimizations have more or less failed (the latter was
 > Victor's, AFAIR).  Is there still interest in pursuing that avenue?
 >
 > Regards
 >
 > Antoine.
 >

I don't think all attempts are failed.  Note that current CPython includes
some optimization already. If they are all failed, we must remove them
  to make compiler simple.

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.

C is a pain to debug. Thankfully Python is not C.
Damaging people's ability to debug their code, to squeeze out 1% performance, is not worthwhile IMO. Especially if that 1 or 2% costs us 10% later because it makes more sophisticated optimizations impractical.

Cheers,
Mark.


Regards,

_______________________________________________
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/BMWA4JES4FFFXMNZAVWCCRJD5NQCPMAK/
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/4K3FMR6XO3YX3EBPBTNR6YRKPSWQGRU7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to