[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: This should be fixed now! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset cd62cc331572 by Antoine Pitrou in branch '3.4': Issue #21523: Fix over-pessimistic computation of the stack effect of some opcodes in the compiler. http://hg.python.org/cpython/rev/cd62cc331572 New changeset e61462e18112 by Antoine Pitrou in branch

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks like the correct solution. That said, I'm more impressed that you were able to test it so cleanly :-) -- nosy: +rhettinger ___ Python tracker __

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch adding some tests. -- stage: -> patch review versions: -Python 3.3 Added file: http://bugs.python.org/file35316/stackdepth2.patch ___ Python tracker ___

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file35315/stackdepth.patch ___ Python tracker ___ __

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: You're right, CPU time is burnt by stackdepth_walk(). The underlying issue is that max stacksize is computed a bit pessimistically with the new opcodes (JUMP_IF_{TRUE,FALSE}_OR_POP). On normal functions there wouldn't be a sizable difference, but on pathologica

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-21 Thread Andrew Dalke
Andrew Dalke added the comment: Live and learn. I did my first bisect today. The first bad revision is: changeset: 51920:ef8fe9088696 branch: legacy-trunk parent: 51916:4e1556012584 user:Jeffrey Yasskin date:Sat Feb 28 19:03:21 2009 + summary: Backport r69961

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Andrew, have you tried to bisect the Mercurial repository to find where the regression was introduced? -- ___ Python tracker ___ __

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-21 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan ___ Python tracker ___ ___ Python-bugs-l

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-18 Thread Andrew Dalke
New submission from Andrew Dalke: Python's compiler has quadratic-time time behavior based on the number of "and" or "or" expressions. A profile shows that stackdepth_walk is calling itself in a stack at least 512 levels deep. (My profiler doesn't go higher than that.) I've reduced it to a sim