psilva261/timsort — pull request #2 by daviddengcn (2013-01-20 05:02:09+00:00)
Title: Using timsort on sort.Interface

1. The timsort algorithm was rewritten on int slice([]int)(The Ints function in timsortint.go). The benchmarks(in benchint_test.go) show it's faster than build-in sort
1. The function TimSort(), defined in timsortint.go, creates an index slice(an int slice), and sort the index slice with timsort (Ints function). Finally swapping on the original data with the sorted indexes.
1. The benchmarks was changed.
1. Standard-sort is performed on a record slice, instead of an interface{} slice.
1. The record slice is also sorted by TimSort function
1. Benchmark results show the interface{} has quite a lot overhead, which makes the standand sorting on random data the fastest. (You can run the benchmarks to see details)