Skip to content

Conversation

sterrettm2
Copy link
Contributor

Adds smart pivot selection to key-value sorting, improving performance in some cases like when one value is extremely common. This gives around a 10x performance improvement when half the data is 0.

@r-devulap
Copy link
Member

uh oh, i remember seeing this failure in #134 as well. Any idea why this happens?

/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = short unsigned int; _Alloc = std::allocator<short unsigned int>; std::vector<_Tp, _Alloc>::reference = short unsigned int&; std::vector<_Tp, _Alloc>::size_type = unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.

Copy link
Member

@r-devulap r-devulap left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @sterrettm2 !

@r-devulap r-devulap merged commit d62f656 into numpy:main Oct 7, 2024
10 of 11 checks passed
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