This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年06月24日 16:05 by benjamin.peterson, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| bettercells.patch | benjamin.peterson, 2011年06月24日 16:05 | review | ||
| x.py | benjamin.peterson, 2011年06月24日 17:45 | |||
| bettercells2.patch | benjamin.peterson, 2011年06月25日 01:00 | review | ||
| Messages (11) | |||
|---|---|---|---|
| msg138956 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2011年06月24日 16:05 | |
Initializing cell variables currently involves 2 nested loops every function call. This patch makes that process much more efficient by saving information which doesn't change every function call to the code object. |
|||
| msg138963 - (view) | Author: Jesús Cea Avión (jcea) * (Python committer) | Date: 2011年06月24日 16:57 | |
Could you possibly post a before/after timing comparison?. Some realistic code... Post the test code too. And yes, I know that the difference will depend of code, and hardware architecture. But some references are better that not reference at all. |
|||
| msg138964 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2011年06月24日 17:04 | |
2011年6月24日 Jesús Cea Avión <report@bugs.python.org>: > > Jesús Cea Avión <jcea@jcea.es> added the comment: > > Could you possibly post a before/after timing comparison?. Some realistic code... Post the test code too. > > And yes, I know that the difference will depend of code, and hardware architecture. But some references are better that not reference at all. Well, I don't really care whether it's faster or not. It's much nicer looking now, though. |
|||
| msg138966 - (view) | Author: Jesús Cea Avión (jcea) * (Python committer) | Date: 2011年06月24日 17:23 | |
Then change the issue title :-p. |
|||
| msg138969 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2011年06月24日 17:45 | |
The attached highly braindead benchmark reports about a 2% improvement. |
|||
| msg139006 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2011年06月25日 00:17 | |
Reviewed. General concept looks sound, just suggested a few tweaks around the edges. And issue title updated appropriately :) |
|||
| msg139014 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2011年06月25日 01:00 | |
Thanks for the review. |
|||
| msg139023 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2011年06月25日 08:02 | |
Feel free to create a new issue about the incorrect size calculation on code objects, since it is apparently already broken. |
|||
| msg139143 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年06月26日 03:54 | |
New changeset c5b0585624ef by Benjamin Peterson in branch 'default': map cells to arg slots at code creation time (closes #12399) http://hg.python.org/cpython/rev/c5b0585624ef |
|||
| msg166513 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2012年07月26日 20:21 | |
See issue15456 for a follow-up issue. |
|||
| msg166515 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年07月26日 20:23 | |
New changeset 5093cfdff2a9 by Martin v. Löwis in branch 'default': Issue #15456: Fix code __sizeof__ after #12399 change. http://hg.python.org/cpython/rev/5093cfdff2a9 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:18 | admin | set | github: 56608 |
| 2012年07月26日 20:23:39 | python-dev | set | messages: + msg166515 |
| 2012年07月26日 20:21:47 | loewis | set | nosy:
+ loewis messages: + msg166513 |
| 2011年06月26日 03:54:52 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg139143 resolution: fixed stage: patch review -> resolved |
| 2011年06月25日 08:02:50 | ncoghlan | set | messages: + msg139023 |
| 2011年06月25日 01:00:58 | benjamin.peterson | set | files:
+ bettercells2.patch messages: + msg139014 |
| 2011年06月25日 00:17:20 | ncoghlan | set | messages:
+ msg139006 title: make cell var initialization more efficient -> simplify cell var initialization by storing constant data on the code object |
| 2011年06月24日 17:45:30 | benjamin.peterson | set | files:
+ x.py messages: + msg138969 |
| 2011年06月24日 17:23:46 | jcea | set | messages: + msg138966 |
| 2011年06月24日 17:04:41 | benjamin.peterson | set | messages: + msg138964 |
| 2011年06月24日 16:57:33 | jcea | set | messages: + msg138963 |
| 2011年06月24日 16:54:04 | jcea | set | nosy:
+ jcea |
| 2011年06月24日 16:05:59 | benjamin.peterson | create | |