When sort() isn't provided with a custom swap function, it falls back onto its generic implementation of just swapping one byte at a time, which is quite slow. Since we know the type of the objects being sorted, we can provide our own swap function which simply uses the swap() macro. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>fourteen
parent
308878a60e
commit
e5c2a8ab88
Loading…
Reference in new issue