Open ruema opened 4 months ago
Why did you close the PR? Unwilling to sign the CLA? Something else? Should this issue be closed?
Another PR was created, but it currently only includes the news entry: #122536
the email address was not set correctly in the git commits. So I had to create a new branch. Sorry for that.
Feature or enhancement
Proposal:
The code for packing and unpacking floating point numbers is typically a single memory operation on modern CPUs. However, the current implementation is much more complex.
The functions
PyFloat_Pack4
,PyFloat_Pack8
,PyFloat_Unpack4
, andPyFloat_Unpack8
can be refactored to allow compilers to produce more optimal machine code.For example, using struct.pack(">d", 1.34) is approximately 1.2 times faster.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs