Skip to content

perf: replace SIMD merge with a generic bitonic sorting network in Stable Simd - #382

Open
Dr-Emann wants to merge 1 commit into
stable_simd_pcmpistrmfrom
stable_simd_bitonic_sort
Open

Dr-Emann wants to merge 1 commit into
stable_simd_pcmpistrmfrom
stable_simd_bitonic_sort

Conversation

@Dr-Emann

@Dr-Emann Dr-Emann commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Use bitonic_merge for array-store union and xor, replacing repeated lane rotations with compare-exchange stages. Generalize the helper to support integer SIMD vectors with power-of-two lane counts.

This both does less work (O(log(N)) vs O(N) per vector), but has less operations dependent on previous operations.

@Dr-Emann
Dr-Emann added this pull request to stack #381 October 9, 2026 17:29
@Dr-Emann Dr-Emann changed the title perf: replace SIMD merge with a generic bitonic sorting network perf: replace SIMD merge with a generic bitonic sorting network in Stable Simd Oct 9, 2026
@Dr-Emann
Dr-Emann force-pushed the stable_simd_bitonic_sort branch 3 times, most recently from 9febca8 to b94450c Compare October 9, 2026 19:05
@Dr-Emann
Dr-Emann force-pushed the stable_simd_bitonic_sort branch from b94450c to 9e43630 Compare October 9, 2026 19:20
@Dr-Emann
Dr-Emann force-pushed the stable_simd_bitonic_sort branch from 9e43630 to a1bd8f7 Compare October 9, 2026 19:56
Use bitonic_merge for array-store union and xor, replacing repeated lane
rotations with compare-exchange stages. Generalize the helper to support
integer SIMD vectors with power-of-two lane counts.
@Dr-Emann
Dr-Emann force-pushed the stable_simd_bitonic_sort branch from a1bd8f7 to c5a0699 Compare October 11, 2026 02:53

This branch has not been deployed

No deployments
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.

1 participant