[issue18932] Optimize selectors.EpollSelector.modify()
Giampaolo Rodola'
report at bugs.python.org
Sun Feb 15 22:31:55 CET 2015
Giampaolo Rodola' added the comment:
Attached is a patch (for epoll only) which updates the SelectorKey. This introduces a considerable slowdown compared to my first patch:
no patch: 16.2 usec per loop
your patch: 12.4 usec per loop
my patch: 10.9 usec per loop
first patch: 3.07 usec per loop
The culprit is the new nameduple's _replace() call. It's a shame a single line adds such a great slowdown. I think it makes sense to investigate whether we can introduce a faster replace mechanism for namedtuple.
----------
nosy: +rhettinger
Added file: http://bugs.python.org/file38152/epoll.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18932>
_______________________________________
More information about the Python-bugs-list
mailing list