lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> When Albert Nijenhuis and Herbert Wilf wrote their seminal work
> "Combinatorial Algorithms" back in 1975, they chose Heapsort
> as the preferred sorting method because it is in-place, has O(n*log(n))
> worst-case time, and among all algorithms with these two properties
> known at the time was shortest to code (23 lines of Fortran) . I think
> it still holds that particular record.

Nevertheless, its memory access pattern is not the best for current machines.