Eugene Toder <elto...@gmail.com> added the comment:

Thomas, can you clarify, does loading interns all constants in co_consts, or do 
you mean that they are mostly small numbers and the like?

Without interning I think that in-memory size difference is even bigger than 
on-disk, as you get one entry in tuple and the object itself. I'm sure I can 
cook up a test that will show some perf difference, because of cache misses or 
paging. You can say that this is not real world code, and you will likely be 
right. But in real world (before you add inlining and constant propagation) 
constant folding doesn't make a lot of difference too, yet people asked for it 
and peepholer does it. Btw, Antoine just improved it quite a bit (Issue11244), 
so size difference with my patch should increase.

My rationale for the patch is that 1) it's real very simple 2) it removes 
feeling of half-done job when you look at the bytecode.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11462>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to