Issue 26315: Optimize mod division for ints (original ) (raw ) This issue has been migrated to GitHub: https://github.com/python/cpython/issues/70503
classification
process
Created on 2016-02-08 22:31 by yselivanov , last changed 2022-04-11 14:58 by admin . This issue is now closed .
Messages (4)
msg259897 - (view)
Author: Yury Selivanov (yselivanov) *
Date: 2016-02-08 22:31
The attached patch implements fast path for modulo division of single digit longs. Some timeit micro-benchmarks: -m timeit -s "x=22331" "x%2;x%3;x%4;x%5;x%6;x%7;x%8;x%99;x%100;" with patch: 0.213 usec without patch: 0.602 usec
msg259898 - (view)
Author: STINNER Victor (vstinner) *
Date: 2016-02-08 22:35
See also issue #21955 .
msg260045 - (view)
Author: STINNER Victor (vstinner) *
Date: 2016-02-10 22:14
Is this patch is a subset of issue #26289 patch?
msg260111 - (view)
Author: Roundup Robot (python-dev)
Date: 2016-02-11 15:27
New changeset 37bacf3fa1f5 by Yury Selivanov in branch 'default': Issues #26289 and #26315 : Optimize floor/modulo div for single-digit longs https://hg.python.org/cpython/rev/37bacf3fa1f5
History
Date
User
Action
Args
2022-04-11 14:58:27
admin
set
github: 70503
2016-02-11 15:27:35
yselivanov
set
status: open -> closedresolution: fixedstage: patch review -> resolved
2016-02-11 15:27:00
python-dev
set
nosy: + python-dev messages: +
2016-02-10 22:14:09
vstinner
set
messages: +
2016-02-09 20:13:42
mark.dickinson
set
nosy: + mark.dickinson
2016-02-08 22:35:45
vstinner
set
messages: +
2016-02-08 22:31:15
yselivanov
create