[issue20826] Faster implementation to collapse consecutive ip-networks
Antoine Pitrou
report at bugs.python.org
Mon May 12 18:34:03 CEST 2014
Antoine Pitrou added the comment:
Here is a much faster patch, around 30x faster than the original code.
With exhuma's data set and tester.py, the original code gives:
$ time python3.4 tester.py
Execution time: 5.949284339199949 seconds
real 0m30.152s
user 0m30.104s
sys 0m0.016s
The patched code gives:
$ time ./python tester.py
Execution time: 0.25444041779992405 seconds
real 0m1.695s
user 0m1.681s
sys 0m0.012s
exhuma, perhaps you want to test with other data sets?
----------
Added file: http://bugs.python.org/file35228/faster_collapse.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20826>
_______________________________________
More information about the Python-bugs-list
mailing list