psilva261/timsort — pull request #3 by daviddengcn (2013-01-21 06:28:11+00:00)
Title: TimSort for sort.Interface

In this merge:

1. An Ints function is provided. It sorts []int. It is faster than normal sort.Sort in every shape.
1. TimSort sorts data with sort.Interface. It is generally faster than Sort, if the data is stored in a slice of the original data-structure(e.g. []record). Faster than sort.Sort if the data is partially sorted (or reverse). But slower than build-in sort.Sort for totally random data.
1. If the data to be sorted is in []interface{}, Sort is the best choice. It is faster than build-in sort.
1. I fixed a vital bug in IsSorted.

In the benchmarks, I let the standard-sort use []record instead of []interface{}, since I think that is a more commonly used pattern and runs much faster.