[New-bugs-announce] [issue26288] Optimize PyLong_AsDouble for single-digit longs

Yury Selivanov report at bugs.python.org
Thu Feb 4 20:55:00 EST 2016


New submission from Yury Selivanov:

The attached patch drastically speeds up PyLong_AsDouble for single digit longs:


-m timeit -s "x=2" "x*2.2 + 2 + x*2.5 + 1.0 - x / 2.0 + (x+0.1)/(x-0.1)*2 + (x+10)*(x-30)"

with patch: 0.414
without: 0.612

spectral_norm: 1.05x faster.    The results are even better when paired with patch from issue #21955.

----------
components: Interpreter Core
files: as_double.patch
keywords: patch
messages: 259615
nosy: haypo, pitrou, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Optimize PyLong_AsDouble for single-digit longs
versions: Python 3.6
Added file: http://bugs.python.org/file41812/as_double.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26288>
_______________________________________


More information about the New-bugs-announce mailing list