[issue2181] optimize out local variables at end of function

2010-07-20 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: Closing as nobody has commented. -- nosy: +BreamoreBoy resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2181

[issue2181] optimize out local variables at end of function

2009-05-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Given that it is unlikely to give any speedup in real-world code, I don't think we should add complexity to the compiler. Recommend closing. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue2181] optimize out local variables at end of function

2008-03-19 Thread Sean Reifschneider
Changes by Sean Reifschneider [EMAIL PROTECTED]: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2181 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2181] optimize out local variables at end of function

2008-03-19 Thread Sean Reifschneider
Changes by Sean Reifschneider [EMAIL PROTECTED]: -- assignee: - nnorwitz priority: - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2181 __ ___

[issue2181] optimize out local variables at end of function

2008-02-28 Thread Armin Rigo
Armin Rigo added the comment: I view this as a problem with Psyco, not with the user code. An even deeper reason for which the general optimization would break code is because it changes the lifetime of objects. For example, Psyco contains specific, user-requested support to make sure the

[issue2181] optimize out local variables at end of function

2008-02-27 Thread Armin Rigo
Armin Rigo added the comment: I suppose you are aware that performing this optimization in general would break a lot of existing code that uses inspect.getstack() or sys._getframe() to peek at the caller's local variables. I know this because it's one thing that Psyco doesn't do correctly, and

[issue2181] optimize out local variables at end of function

2008-02-27 Thread Neal Norwitz
Neal Norwitz added the comment: I suppose you are aware that performing this optimization in general would break a lot of existing code that uses inspect.getstack() or sys._getframe() to peek at the caller's local variables. I know this Yes, with this optimization the variable might

[issue2181] optimize out local variables at end of function

2008-02-24 Thread Neal Norwitz
New submission from Neal Norwitz: This patch optimizes code like: x = any_expression return x to: return any_expression Currently it only optimizes out the local variable if there is a return because it can't determine if this is the last use of the variable or not. This shouldn't

[issue2181] optimize out local variables at end of function

2008-02-24 Thread Neal Norwitz
Neal Norwitz added the comment: I forgot to mention that if another loop was added to PyCode_Optimize that kept track of the # of times each local variable was LOAD_FAST/STORE_FAST/DELETE_FAST and that the count was 2, we could perform a similar optimization without requiring the return. Bonus

[issue2181] optimize out local variables at end of function

2008-02-24 Thread Neal Norwitz
Neal Norwitz added the comment: I forgot to mention that if another loop was added to PyCode_Optimize that kept track of the # of times each local variable was LOAD_FAST/STORE_FAST/DELETE_FAST and that the count was 2, we could perform a similar optimization without requiring the return. Bonus

[issue2181] optimize out local variables at end of function

2008-02-24 Thread Neal Norwitz
Neal Norwitz added the comment: Guido says to do it only with -O. http://mail.python.org/pipermail/python-dev/2008-February/077193.html __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2181 __