Skip to content

perf: simd double math binary ops - #20875

Merged
clintropolis merged 5 commits into
apache:masterfrom
clintropolis:simd-double-math-binary-ops
Nov 25, 2026
Merged

clintropolis merged 5 commits into
apache:masterfrom
clintropolis:simd-double-math-binary-ops

Conversation

@clintropolis

Copy link
Copy Markdown
Member

Description

Adds simd wiring for POWER, ATAN2, and HYPOT (as well as SQL binding for hypot)

Benchmarks:

# Op Shape Scalar (ms/op) SIMD (ms/op) Speedup
97 POWER dd 45.31 39.91 1.14×
98 POWER dl 46.79 40.30 1.16×
99 POWER ld 54.36 36.07 1.51×
100 POWER ll 55.62 36.21 1.54×
101 ATAN2 dd 54.39 28.79 1.89×
102 ATAN2 dl 34.59 25.34 1.37×
103 ATAN2 ld 42.43 25.20 1.68×
104 ATAN2 ll 43.22 24.83 1.74×
105 HYPOT dd 43.98 23.42 1.88×
106 HYPOT dl 29.60 19.61 1.51×
107 HYPOT ld 30.43 19.59 1.55×
108 HYPOT ll 29.31 19.64 1.49×

FrankChen021

This comment was marked as resolved.

FrankChen021

This comment was marked as outdated.

@FrankChen021 FrankChen021 added the Approval Recommended Used when AI completes a review and reports no findings label Nov 12, 2026

@amaechler amaechler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff! Buddy Claude had two comments I think are valuable (one small docs, one around pow() edge-cases) to consider.

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No actionable issues found. The incremental POW fix restores Math.pow NaN behavior for the relevant C99 corner cases, while the full SIMD wiring, type dispatch, null handling, tails, SQL registration, tests, benchmarks, and documentation remain consistent.

Reviewed 25 of 25 changed files. Updated-head focus covered the 5 files changed since the previous review, then reconciled them with the complete PR diff and surrounding code.

Validation: git diff --check passed. No project tests, builds, installs, or formatters were run.


This is an automated review by Codex GPT-5.6-Luna(max)

@amaechler amaechler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beauty 🐻. Some final small nits.

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No actionable issues found. The incremental change is non-functional, and the complete diff remains consistent across SIMD dispatch, operand handling, nulls, tails, POW special cases, SQL registration, tests, benchmarks, and documentation. The prior power-operator tolerance issue remains resolved.

Reviewed 25 of 25 changed files. Updated-head focus covered the 1 file changed since the previous review, then reconciled it against the complete current diff and surrounding code.

Validation: git diff --check passed. No project tests, builds, installs, or formatters were run.


This is an automated review by Codex GPT-5.6-Luna(max)

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No actionable issues found. The incremental diff is whitespace-only, and the complete current diff remains consistent across SIMD dispatch, operand shapes, POW special cases, null propagation, tails, SQL registration, tests, benchmarks, and documentation. The prior ^ power-tolerance finding remains resolved.

Reviewed 25 of 25 changed files. Updated-head focus covered the 1 file changed since the previous review, then reconciled it against the complete current diff and surrounding code.

Validation: Narrow JDK 25 Vector API inspection only; no project tests, builds, installs, or formatters were run.


This is an automated review by Codex GPT-5.6-Luna(max)

@clintropolis
clintropolis merged commit 1f48c2b into apache:master Nov 25, 2026
48 of 50 checks passed
@clintropolis
clintropolis deleted the simd-double-math-binary-ops branch November 25, 2026 07:24
@github-actions github-actions Bot added this to the 40.0.0 milestone Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approval Recommended Used when AI completes a review and reports no findings Area - Documentation Area - Querying

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants