]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] low performance of lib/sort.c
authorkeios <keios.cn@gmail.com>
Tue, 3 Oct 2006 08:13:49 +0000 (01:13 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 3 Oct 2006 15:03:41 +0000 (08:03 -0700)
commit7adf62421c2adfdf4e6d64d6a9978d6b1121f348
tree9c8617cb3f58faace4941a0aa09ea1820d287b7c
parenta6c5ff1812de2b823b26dd282410d7bfb8517a5a
[PATCH] low performance of lib/sort.c

It is a non-standard heap-sort algorithm implementation because the index
of child node is wrong .  The sort function still outputs right result, but
the performance is O( n * ( log(n) + 1 ) ) , about 10% ~ 20% worse than
standard algorithm.

Signed-off-by: keios <keios.cn@gmail.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Acked-by: Zou Nan hai <nanhai.zou@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
lib/sort.c