Issue 1337051: remove 4 ints from PyFrameObject (original) (raw)

Created on 2005-10-25 06:18 by nnorwitz, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
remove-4-frame-ints.patch nnorwitz,2005-10-25 06:18
Messages (4)
msg48903 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-10-25 06:18
Decreases the size of each frame object by 32 bytes. The 4 ints are already in the PyCodeObject. Well, 2 are in there directly (co_nlocals and co_stacksize). The other 2 are the tuple lengths of co_cellvars and co_freevars. I ran pybench before and after the patch. With the patch, the interpreter was .002 seconds slower, ie, noise. I get more variability than that with each recompile. Mostly the change is from using f->f_... to co->co_... ie, no difference in pointer derefs, just deref a different pointer. I don't see a good reason to duplicate the data.
msg48904 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-11-02 07:14
Logged In: YES user_id=33168 Heh, my math sucks. It should be 16 bytes, not 32. Though I got rid of 1 more (f_restricted), so it's really 20 bytes now. I need to clean up the patch and attach here.
msg48905 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-02-20 10:37
Logged In: YES user_id=1188172 Can this go into 2.5?
msg48906 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2006-05-23 18:59
Logged In: YES user_id=31435 Yes, it can. And did! Thanks be to Richard Jones.
History
Date User Action Args
2022-04-11 14:56:13 admin set github: 42516
2005-10-25 06🔞09 nnorwitz create