]> Cypherpunks repositories - gostls13.git/commit
suffixarray: use binary search for both ends of Lookup
authorEric Eisner <eric.d.eisner@gmail.com>
Mon, 24 Jan 2011 21:03:32 +0000 (13:03 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 24 Jan 2011 21:03:32 +0000 (13:03 -0800)
commitab036abdf02620dd018c27217b3cd15f4042588d
tree42872fc0561778324e93178dfbfb6b38b959f15a
parent2aa6cf3e7ec578d7fb4d4a2aa73e4685fb5df1de
suffixarray: use binary search for both ends of Lookup

This prevents many unnecessary comparisons when n is large.

R=gri, gri1, rsc
CC=golang-dev
https://golang.org/cl/4068043
src/pkg/index/suffixarray/suffixarray.go