-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement
Description
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, and PyFloat_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
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement