You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fabulous performance optimization 3-4X for the worst-case of a constant array, which also makes sense for all other cases and doesn't make a special case for constant array.
if(_current_ib>=startOfBin[kthBin+1]||_current_ob>=startOfBin[kthBin])break;// The bin that k is in is full or all the element outside the bin to the left have been exhausted
52
53
a[_current_ib++]=a[_current_ob++];// Move the element that belongs in the bin into the bin
@@ -55,11 +56,12 @@ private static void RadixSelectiontMsdUIntInner(uint[] a, int first, int length,
55
56
while(true)// process elements outside the bin that k is in, which are to the right of that bin
56
57
{
57
58
// Look for the element that belongs in the bin that k is in, to move into that bin
if(_current_ib>=startOfBin[kthBin+1]||_current_ob>last)break;// The bin that k is in is full or all the element outside the bin to the right have been exhausted
65
67
a[_current_ib++]=a[_current_ob++];// Move the element that belongs in the bin into the bin
0 commit comments