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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28060>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to