On Tue, 18 Jul 2017 12:03:36 -0400 Ben Hoyt <benh...@gmail.com> wrote:
> Hi folks, > > (Not entirely sure this is the right place for this question, but hopefully > it's of interest to several folks.) > > A few days ago I posted a note in response to Victor Stinner's articles on > his CPython contributions, noting that I wrote a program that ran in 11.7 > seconds on Python 2.7, but only takes 5.1 seconds on Python 3.5 (on my 2.5 > GHz macOS i7), more than 2x as fast. Obviously this is a Good Thing, but > I'm curious as to why there's so much difference. > > The program is a pentomino puzzle solver, and it works via code generation, > generating a ton of nested "if" statements, so I believe it's exercising > the Python bytecode interpreter heavily. A first step would be to see if the generated bytecode has changed substantially. Otherwise, you can try to comment out parts of the function until the performance difference has been nullified. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com