sort: eliminate extra Len() call

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5521052
This commit is contained in:
Robert Griesemer 2012-01-05 18:40:17 -08:00
parent a3baccefd6
commit e36acdfb56

View file

@ -191,7 +191,7 @@ func Sort(data Interface) {
maxDepth++
}
maxDepth *= 2
quickSort(data, 0, data.Len(), maxDepth)
quickSort(data, 0, n, maxDepth)
}
func IsSorted(data Interface) bool {