Message175998
Personally I don't like the use of macros inn this code. I think that without them the code would be clearer.
If anyone is interested, here are the statistics for all the standard modules (Lib/__pycache__/*.pyc).
UNICODE 105248 61%
TUPLE 33193 19%
STRING 13527 7.8%
INT 7373 4.3%
CODE 6438 3.7%
NONE 5291 3.1%
TRUE 474 0.27%
FALSE 401 0.23%
BINARY_FLOAT 340 0.2%
LONG 60 0.035%
FROZENSET 20 0.012%
Strings (unicode and bytes), tuples, short ints, code objects and None in sum are 99% of all objects. Mutable collections, complex numbers, Ellipsis and StopIteration are not used at all.
If size of compiled modules is a problem, we can get about 10% by using more compact representation for sizes (1- or 2-bytes). This requires additional codes for strings and collections (at least for unicode strings and tuples). |
|
Date |
User |
Action |
Args |
2012-11-20 15:46:44 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, loewis, gregory.p.smith, mark.dickinson, pitrou, kristjan.jonsson, christian.heimes |
2012-11-20 15:46:43 | serhiy.storchaka | set | messageid: <1353426403.86.0.990704370081.issue16475@psf.upfronthosting.co.za> |
2012-11-20 15:46:43 | serhiy.storchaka | link | issue16475 messages |
2012-11-20 15:46:43 | serhiy.storchaka | create | |
|