Use paired sin_cos in the complex from_polar helpers - #89
Closed
marknefedov wants to merge 1 commit into
Closed
Conversation
complex_from_polar and the three SIMD backends' simd_complex_from_polar called sine and cosine separately on the same angle, performing the argument reduction twice. They now call sin_cos / simd_sin_cos once and use both outputs. This feeds complex exp, sqrt, powf and powc.
marknefedov
force-pushed
the
paired-sin-cos
branch
from
August 14, 2026 20:58
afce084 to
9bd9e56
Compare
Author
|
Closing this: I benchmarked the related lane-access change and couldn't demonstrate a measurable win for this family of tweaks, so I'm withdrawing the unmeasured ones rather than asking for review time on speculation. Can reopen with numbers if I get around to benchmarking the complex-math paths. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
complex_from_polarand the three SIMD backends'simd_complex_from_polarcall sine and cosine separately on the same angle, running the argument reduction twice. This switches them to a singlesin_cos/simd_sin_coscall. These helpers sit under complexexp,sqrt,powfandpowc.Possible last-bit differences on backends whose fused sin_cos differs from separate calls. Withdrawn: no measured numbers for this path.