New submission from Yury Selivanov: 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 ---------- assignee: yselivanov components: Interpreter Core files: mod_div.patch keywords: patch messages: 259897 nosy: haypo, serhiy.storchaka, yselivanov priority: normal severity: normal stage: patch review status: open title: Optimize mod division for ints type: performance versions: Python 3.6 Added file: http://bugs.python.org/file41861/mod_div.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26315> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com