Message291470
dict.clear() make the dict to empty key-sharing dict to reduce it's size.
New dict can use same technique.
$ ./python.default
Python 3.7.0a0 (heads/master:6dfcc81, Apr 10 2017, 19:55:52)
[GCC 6.2.0 20161005] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> d = {}
>>> sys.getsizeof(d)
240
>>> d.clear()
>>> sys.getsizeof(d)
72
$ ./python.patched
Python 3.7.0a0 (heads/master-dirty:6dfcc81, Apr 11 2017, 18:11:02)
[GCC 6.2.0 20161005] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.getsizeof({})
72 |
|
Date |
User |
Action |
Args |
2017-04-11 09:39:20 | methane | set | recipients:
+ methane |
2017-04-11 09:39:20 | methane | set | messageid: <1491903560.12.0.959603376514.issue30040@psf.upfronthosting.co.za> |
2017-04-11 09:39:20 | methane | link | issue30040 messages |
2017-04-11 09:39:19 | methane | create | |
|