[New-bugs-announce] [issue28060] Clean up division fast paths in Objects/longobject.c

Mark Dickinson report at bugs.python.org
Sat Sep 10 06:46:13 EDT 2016

New submission from Mark Dickinson:

We seem to have ended up with redundant fast path checks for division in longobject.c: long_div has a fast path check, but the long_div slow path calls l_divmod, which then does a second, identical, fast path check. long_mod has similar behaviour. long_divmod, however, has no fast path, so relies on the one from l_divmod.

This patch removes the extra fast path from l_divmod, and then adds a top-level fast path check to long_divmod.

assignee: mark.dickinson
files: divmod_fastpath.patch
keywords: patch
messages: 275618
nosy: mark.dickinson
priority: normal
severity: normal
stage: commit review
status: open
title: Clean up division fast paths in Objects/longobject.c
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file44528/divmod_fastpath.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list