Skip to content

style(simd): rename sse to avx#821

Merged
samber merged 3 commits intomasterfrom
style/rename-sse-to-avx
Feb 26, 2026
Merged

style(simd): rename sse to avx#821
samber merged 3 commits intomasterfrom
style/rename-sse-to-avx

Conversation

@samber
Copy link
Owner

@samber samber commented Feb 26, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 26, 2026 19:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR performs a systematic rename from "SSE" to "AVX" throughout the SIMD package codebase, updating terminology for 128-bit SIMD operations. The changes reflect a shift in how the package refers to its 128-bit instruction set support, moving from SSE (Streaming SIMD Extensions) terminology to AVX (Advanced Vector Extensions).

Changes:

  • Renamed SSE references to AVX in comments, documentation, function names, and benchmark names across all SIMD files
  • Added requireAVX(t) function to check for AVX CPU support in tests and benchmarks
  • Updated test requirements from requireAVX512 to requireAVX for Int64x2/Uint64x2 operations that work with 128-bit AVX
  • Reformatted type aliases in test file to use grouped declaration syntax
  • Updated documentation sourceRef links to point to math_avx.go instead of math_sse.go

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
exp/simd/simd_test.go Reformatted type aliases into grouped declaration
exp/simd/math_bench_test.go Renamed SSE to AVX in benchmark names and added requireAVX() calls
exp/simd/math_avx_test.go Renamed test function names from SSE to AVX, added requireAVX() calls, corrected AVX-512 to AVX for Int64x2/Uint64x2 tests
exp/simd/math_avx.go Updated all comments and documentation strings from SSE to AVX terminology
exp/simd/intersect_bench_test.go Renamed SSE to AVX in benchmark names and comments
exp/simd/intersect_avx512.go Updated function documentation to reference AVX alongside AVX-512
exp/simd/cpu_amd64_test.go Added requireAVX() function and updated CPU support documentation
exp/simd/README.md Updated documentation table and instructions for AVX terminology
exp/simd/BENCHMARK.md Updated all benchmark result tables with AVX naming
docs/data/*.md Updated SIMD variant tables and example comments to use AVX instead of SSE, updated sourceRef file paths
Comments suppressed due to low confidence (1)

exp/simd/math_avx.go:12

  • The comment states "AVX (128-bit)" but technically AVX can operate on both 128-bit and 256-bit registers. Consider clarifying this as "AVX 128-bit operations" or "AVX (using 128-bit registers)" to avoid confusion with AVX2 which uses 256-bit registers. The same issue appears throughout the file where "AVX (128-bit)" is used.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| SIMD variant | Lanes | Required flags | Typical CPUs |
| ------------ | ----- | -------------- | ------------------------------ |
| SSE (xN) | 2-16 | `sse2` | All amd64 |
| AVX (xN) | 2-16 | `avx` | All amd64 |
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

Same issue: AVX is listed as supported on "All amd64" but this is inaccurate. AVX requires CPUs from 2011 or later (Intel Sandy Bridge+, AMD Bulldozer+). Older x86-64 processors don't support AVX.

Copilot uses AI. Check for mistakes.
| SIMD variant | Lanes | Required flags | Typical CPUs |
| ------------ | ----- | -------------- | ------------------------------ |
| SSE (xN) | 2-16 | `sse2` | All amd64 |
| AVX (xN) | 2-16 | `avx` | All amd64 |
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

Same issue: AVX support listed as "All amd64" is inaccurate. AVX requires 2011+ era CPUs.

Copilot uses AI. Check for mistakes.
| SIMD variant | Lanes | Required flags | Typical CPUs |
| ------------ | ----- | -------------- | ------------------------------ |
| SSE (xN) | 2-16 | `sse2` | All amd64 |
| AVX (xN) | 2-16 | `avx` | All amd64 |
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

Same issue: AVX support listed as "All amd64" is inaccurate. AVX requires 2011+ era CPUs.

Copilot uses AI. Check for mistakes.
| SIMD variant | Lanes | Required flags | Typical CPUs |
| ------------ | ----- | -------------- | ------------------------------ |
| SSE (xN) | 2-16 | `sse2` | All amd64 |
| AVX (xN) | 2-16 | `avx` | All amd64 |
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

Same issue: AVX support listed as "All amd64" is inaccurate. AVX requires 2011+ era CPUs.

Copilot uses AI. Check for mistakes.
| SIMD variant | Lanes | Required flags | Typical CPUs |
| ------------ | ----- | -------------- | ------------------------------ |
| SSE (xN) | 2-16 | `sse2` | All amd64 |
| AVX (xN) | 2-16 | `avx` | All amd64 |
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

Same issue as in README.md and cpu_amd64_test.go: AVX is stated as "All amd64" but AVX is not supported on all x86-64/amd64 CPUs. Pre-2011 CPUs lack AVX support. Consider noting the minimum CPU generation requirement (e.g., "Intel Sandy Bridge+ (2011), AMD Bulldozer+ (2011)") instead of "All amd64".

Copilot uses AI. Check for mistakes.
| SIMD variant | Lanes | Required flags | Typical CPUs |
| ------------ | ----- | -------------- | ------------------------------ |
| SSE (xN) | 2-16 | `sse2` | All amd64 |
| AVX (xN) | 2-16 | `avx` | All amd64 |
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

Same issue: AVX support listed as "All amd64" is inaccurate. AVX requires 2011+ era CPUs.

Copilot uses AI. Check for mistakes.
| SIMD variant | Lanes | Required flags | Typical CPUs |
| ------------ | ----- | -------------- | ------------------------------ |
| SSE (xN) | 2-16 | `sse2` | All amd64 |
| AVX (xN) | 2-16 | `avx` | All amd64 |
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

Same issue: AVX support listed as "All amd64" is inaccurate. AVX requires 2011+ era CPUs.

Copilot uses AI. Check for mistakes.
| SIMD variant | Lanes | Required flags | Typical CPUs |
| ------------ | ----- | -------------- | ------------------------------ |
| SSE (xN) | 2-16 | `sse2` | All amd64 |
| AVX (xN) | 2-16 | `avx` | All amd64 |
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

Same issue: AVX support listed as "All amd64" is inaccurate. AVX requires 2011+ era CPUs.

Copilot uses AI. Check for mistakes.
@samber samber force-pushed the style/rename-sse-to-avx branch from 965846d to e3044d7 Compare February 26, 2026 20:02
@samber samber merged commit ac8295b into master Feb 26, 2026
14 checks passed
@samber samber deleted the style/rename-sse-to-avx branch February 26, 2026 21:08
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.06%. Comparing base (b9c84bc) to head (fbff4ad).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #821      +/-   ##
==========================================
- Coverage   92.10%   92.06%   -0.05%     
==========================================
  Files          32       32              
  Lines        4230     4232       +2     
==========================================
  Hits         3896     3896              
- Misses        251      252       +1     
- Partials       83       84       +1     
Flag Coverage Δ
unittests 92.06% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants