[issue25430] speed up ipaddress __contain__ method

2019-10-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Closing it as resolved since the optimization was merged in 3.8.0 . Thanks @gescheit for the report and patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

[issue25430] speed up ipaddress __contain__ method

2019-04-30 Thread Inada Naoki
Inada Naoki added the comment: New changeset 3bbcc92577f8e616bc94c679040043bacd00ebf1 by Inada Naoki (gescheit) in branch 'master': bpo-25430: improve performance of IPNetwork.__contains__ (GH-1785) https://github.com/python/cpython/commit/3bbcc92577f8e616bc94c679040043bacd00ebf1

[issue25430] speed up ipaddress __contain__ method

2018-12-16 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Though this is out of the scope of the issue I tried converting num_addresses, __hash__, __getitem__ and __eq__ as per Serhiy's idea for IPv6Network replacing the stdlib implementation's int calls with _ip in a custom class. I can see up to 50%

[issue25430] speed up ipaddress __contain__ method

2018-12-12 Thread Antoine Pitrou
Change by Antoine Pitrou : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25430] speed up ipaddress __contain__ method

2017-08-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

[issue25430] speed up ipaddress __contain__ method

2017-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I confirm that the proposed code is equivalent to the existing code and is faster. The largest part (~70%) of the speed up is caused by replacing int() calls with direct attribute access to _ip. I'm wondering whether it is worth to get rid of int() calls in

[issue25430] speed up ipaddress __contain__ method

2017-05-24 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1866 ___ Python tracker ___

[issue25430] speed up ipaddress __contain__ method

2017-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hi Aleksandr, well, sorry for the detail. We now use GitHub for patch submission, would you like to submit a PR at https://github.com/python/cpython/ (see devguide at https://cpython-devguide.readthedocs.io/ for more information). If you don't want to do

[issue25430] speed up ipaddress __contain__ method

2017-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: s/sorry for the detail/sorry for the delay/ -- ___ Python tracker ___ ___

[issue25430] speed up ipaddress __contain__ method

2017-05-23 Thread Aleksandr Balezin
Aleksandr Balezin added the comment: I think this patch can be easily applied. There are no any breaking changes. My colleagues and I assume that ipaddress module would work fast because it is easy to imagine tasks, operate with ton of networks. Also, current comparison implementation works as

[issue25430] speed up ipaddress __contain__ method

2015-10-17 Thread Aleksandr Balezin
Changes by Aleksandr Balezin : -- versions: +Python 3.4, Python 3.6 ___ Python tracker ___

[issue25430] speed up ipaddress __contain__ method

2015-10-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +ncoghlan, pmoody stage: -> patch review versions: -Python 3.4, Python 3.5 ___ Python tracker