Thread (1 message) 1 message, 1 author, 2014-12-10

Re: [PATCH] Avoid possible memory cpoy when sort hugepages

From: Jay Rolette <hidden>
Date: 2014-12-10 17:58:22

On Wed, Dec 10, 2014 at 5:08 AM, Ananyev, Konstantin <
konstantin.ananyev-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
I wonder why we do need to write our own bubble sort procedure?
Why we can't use standard qsort() here?
Sadly, even bubble sort would be better than the selection sort being used
here. It's guaranteed to be O(n^2) in all cases.

I just got through replacing that entire function in my repo with a call to
qsort() from the standard library last night myself. Faster (although
probably not material to most deployments) and less code.

Jay
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help