Author serhiy.storchaka
Recipients ncoghlan, pitrou, pmoody, python-dev, serhiy.storchaka
Date 2015-01-18.20:53:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1421614436.69.0.80105661934.issue23133@psf.upfronthosting.co.za>
In-reply-to
Content
Thank you Antoine.

And here is comparison of pickle size.

Unpatched:
>>> len(pickle.dumps([ipaddress.ip_address('192.0.2.%s'%i) for i in range(1, 101)]))
2971
>>> len(pickle.dumps([ipaddress.ip_address('2001:db8::%x'%i) for i in range(1, 101)]))
4071
>>> len(pickle.dumps([ipaddress.ip_interface('192.0.2.%s/27'%i) for i in range(1, 101)]))
19341
>>> len(pickle.dumps([ipaddress.ip_interface('2001:db8::%x/124'%i) for i in range(1, 101)]))
22741
>>> len(pickle.dumps([ipaddress.ip_network('192.0.2.%s/27'%(i&-32)) for i in range(1, 101)]))
10614
>>> len(pickle.dumps([ipaddress.ip_interface('2001:db8::%x/124'%(i&-32)) for i in range(1, 101)]))
22741

Patched:
>>> len(pickle.dumps([ipaddress.ip_address('192.0.2.%s'%i) for i in range(1, 101)]))
1531
>>> len(pickle.dumps([ipaddress.ip_address('2001:db8::%x'%i) for i in range(1, 101)]))
2631
>>> len(pickle.dumps([ipaddress.ip_interface('192.0.2.%s/27'%i) for i in range(1, 101)]))
2963
>>> len(pickle.dumps([ipaddress.ip_interface('2001:db8::%x/124'%i) for i in range(1, 101)]))
3256
>>> len(pickle.dumps([ipaddress.ip_network('192.0.2.%s/27'%(i&-32)) for i in range(1, 101)]))
2938
>>> len(pickle.dumps([ipaddress.ip_interface('2001:db8::%x/124'%(i&-32)) for i in range(1, 101)]))
3209
History
Date User Action Args
2015-01-18 20:53:56serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, pitrou, pmoody, python-dev
2015-01-18 20:53:56serhiy.storchakasetmessageid: <1421614436.69.0.80105661934.issue23133@psf.upfronthosting.co.za>
2015-01-18 20:53:56serhiy.storchakalinkissue23133 messages
2015-01-18 20:53:56serhiy.storchakacreate