[issue23103] ipaddress should be Flyweight

Seth Bromberger report at bugs.python.org
Wed Dec 24 00:27:11 CET 2014


Seth Bromberger added the comment:

Sorry for the additional followup, but I re-ran the test with approximately real-world parameters. In this second test, I created 10 million Foo() instances with random values from 1-2000 (using random.randint). This corresponds to "2000 hosts generating 10 million logs".

Memory use is ~80 MB. Times: CPU times: user 27.5 s, sys: 101 ms, total: 27.6 s Wall time: 27.6 s

For the nonoptimized run (10m instances of 2000 random values):
Memory use is ~1.8GB. Times: CPU times: user 28.2 s, sys: 1.29 s, total: 29.5 s Wall time: 29.5 s

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23103>
_______________________________________


More information about the Python-bugs-list mailing list