8000 ENH: Migrate x86 quick/select sorting to Highway (part 1/2) by seiko2plus · Pull Request #29829 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Conversation

seiko2plus
Copy link
Member

Transition quicksort and selection (qselect) for all supported types
from Intel’s x86 SIMD sort to Google Highway’s VQSort/VQSelect. This
unifies the sorting backend on Highway, reduces code complexity and
dependencies, preserves performance, and this patch also enables qselect
on other architectures.

Changes

  • Remove x86_simd_qsort_16bit.dispatch.cpp.
  • Update highway_qsort.hpp to call Highway VQSort/VQSelect directly.
  • Remove Intel-specific conditionals and dispatch paths.
  • Eliminate logic that toggled between Intel and Highway implementations.

Follow-up (part 2/2)

  • Migrate argsort to Highway (requires corresponding Highway changes).

Transition quicksort and selection (qselect) for all supported types
from Intel’s x86 SIMD sort to Google Highway’s VQSort/VQSelect. This
unifies the sorting backend on Highway, reduces code complexity and
dependencies, preserves performance, and this patch also enables qselect
on other architectures.

Changes
-------
- Remove `x86_simd_qsort_16bit.dispatch.cpp`.
- Update `highway_qsort.hpp` to call Highway VQSort/VQSelect directly.
- Remove Intel-specific conditionals and dispatch paths.
- Eliminate logic that toggled between Intel and Highway implementations.

Follow-up (part 2/2)
--------------------
- Migrate `argsort` to Highway (requires corresponding Highway changes).
`np.partition`` doesn’t guarantee intra-partition order, so whole-array
equality for kth=-m vs kth=n-m can fail even when both are correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

01 - Enhancement component: SIMD Issues in SIMD (fast instruction sets) code or machinery

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0