[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


Change by Tim Peters :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


Tim Peters  added the comment:


New changeset 7c26472d09548905d8c158b26b6a2b12de6cdc32 by Tim Peters in branch 
'main':
bpo-46504: faster code for trial quotient in x_divrem() (GH-30856)
https://github.com/python/cpython/commit/7c26472d09548905d8c158b26b6a2b12de6cdc32


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


Change by Tim Peters :


--
assignee:  -> tim.peters
nosy: +gregory.p.smith, mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


Change by Tim Peters :


--
keywords: +patch
pull_requests: +29037
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/30856

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


Change by Tim Peters :


--
versions: +Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


New submission from Tim Peters :

x_divrem1() was recently (bpo-46406) changed to generate faster code for 
division, essentially nudging optimizing compilers into recognizing that modern 
processors compute the quotient and remainder with a single machine instruction.

The same can be done for x_divrem(), although it's less valuable there because 
the HW division generally accounts for a much smaller percent of its total 
runtime.

Still, it does cut a multiply and subtract out of the loop, and makes the code 
more obvious (since it brings x_divrem1() and x_divrem() back into synch).

--
components: Interpreter Core
messages: 411505
nosy: tim.peters
priority: normal
severity: normal
stage: needs patch
status: open
title: Faster code for trial quotient in x_divrem
type: performance

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com