xen/common: low performance of lib/sort.c
authorkeios <keios.cn@gmail.com>
Tue, 3 Oct 2006 08:13:49 +0000 (01:13 -0700)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 2 Mar 2017 15:52:45 +0000 (15:52 +0000)
commitc7cde9e28bb537945c003e5d28525713f5a6eb15
tree67e436676c8320a5617af334681f8edc9b17a814
parent26735f30dffe1091686bbe921aacbea8ba371cc8
xen/common: 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>
[Linux commit: d3717bdf8f08a0e1039158c8bab2c24d20f492b6]
[Ported to Xen]
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/sort.c