Serhiy Storchaka added the comment:

Only one duplicated address is degenerated case. When there is a lot of 
duplicated addresses in range the patch causes regression.

$ ./python -m timeit -s "import ipaddress; ips = 
[ipaddress.ip_address('2001:db8::%x' % (i%100)) for i in range(100000)]" -- 
"ipaddress.collapse_addresses(ips)"

Unpatched: 10 loops, best of 3: 369 msec per loop
Patched: 10 loops, best of 3: 1.04 sec per loop

----------

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

Reply via email to