[issue30014] Speedup DefaultSelectors.modify() by 1.5x

2017-04-07 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue30014] Speedup DefaultSelectors.modify() by 1.5x

2017-04-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > The idea is to reuse _BaseSelectorImpl.register() and > _BaseSelectorImpl.unregister() to factorize the code. You can't factorize the logic of modify() into those as they do two different things. I also don't like repeating the same thing 3 times but

[issue30014] Speedup DefaultSelectors.modify() by 1.5x

2017-04-07 Thread STINNER Victor
STINNER Victor added the comment: > Doesn't that mean doing 3 operations (unregister(), register(), modify()) > instead of the current 2 (unregister(), register())? I don't see how it can > be faster than a single modify() syscall. The idea is to reuse _BaseSelectorImpl.register() and

[issue30014] Speedup DefaultSelectors.modify() by 1.5x

2017-04-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > My patch calls generic unregister() and register() of the base > classes, but it only uses one syscall per modify() call. Doesn't that mean doing 3 operations (unregister(), register(), modify()) instead of the current 2 (unregister(), register())? I

[issue30014] Speedup DefaultSelectors.modify() by 1.5x

2017-04-07 Thread STINNER Victor
Changes by STINNER Victor : -- title: Speedup DefaultSelectors.modify() by 2x -> Speedup DefaultSelectors.modify() by 1.5x ___ Python tracker