This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients mark.dickinson, rhettinger, serhiy.storchaka, stutzbach, vstinner
Date 2019-01-11.18:17:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547230644.92.0.865651994946.issue35719@roundup.psfhosted.org>
In-reply-to
Content
The proposed PR makes multi-argument functions in the math module atan2(), copysign(), remainder() and hypot() to use the fast call convention and inline arguments tuple unpacking.

Results:

$ ./python -m timeit -s "from math import atan2" "atan2(1.0, 1.0)"
Unpatched:  5000000 loops, best of 5: 79.5 nsec per loop
Patched:    5000000 loops, best of 5: 66.1 nsec per loop

$ ./python -m timeit -s "from math import copysign" "copysign(1.0, 1.0)"
Unpatched:  5000000 loops, best of 5: 90.3 nsec per loop
Patched:    10000000 loops, best of 5: 35.9 nsec per loop

$ ./python -m timeit -s "from math import remainder" "remainder(1.0, 1.0)"
Unpatched:  5000000 loops, best of 5: 69.5 nsec per loop
Patched:    5000000 loops, best of 5: 44.5 nsec per loop

$ ./python -m timeit -s "from math import hypot" "hypot(1.0, 1.0)"
Unpatched:  5000000 loops, best of 5: 63.6 nsec per loop
Patched:    5000000 loops, best of 5: 47.4 nsec per loop
History
Date User Action Args
2019-01-11 18:17:27serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, mark.dickinson, vstinner, stutzbach
2019-01-11 18:17:24serhiy.storchakasetmessageid: <1547230644.92.0.865651994946.issue35719@roundup.psfhosted.org>
2019-01-11 18:17:24serhiy.storchakalinkissue35719 messages
2019-01-11 18:17:24serhiy.storchakacreate