Skip to content
Commit 21d30c77 authored by Adhemerval Zanella's avatar Adhemerval Zanella
Browse files

stdlib: Optimization qsort{_r} swap implementation



The optimization takes in consideration both the most common elements
are either 32 or 64 bit in size and inputs are aligned to the word
boundary.  This is similar to what msort does.

For large buffer the swap operation uses memcpy/mempcpy with a
small fixed size buffer (so compiler might inline the operations).

Checked on x86_64-linux-gnu.
Reviewed-by: default avatarNoah Goldstein <goldstein.w.n@gmail.com>
parent fccf38c5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment