]> Cypherpunks repositories - gostls13.git/commit
exp/locale/collate: changed implementation of Compare and CompareString to
authorMarcel van Lohuizen <mpvl@golang.org>
Thu, 15 Nov 2012 21:23:56 +0000 (22:23 +0100)
committerMarcel van Lohuizen <mpvl@golang.org>
Thu, 15 Nov 2012 21:23:56 +0000 (22:23 +0100)
commit8b7ea6489c40f2e54d01836b2fae611c39fb09d4
treedbdb8361d22364a60797bf7d95ba875e60607b68
parent0d0eff71652a0b8fcbfe678763d88eb142a544f9
exp/locale/collate: changed implementation of Compare and CompareString to
compare incrementally. Also modified collation API to be more high-level
by removing the need for an explicit buffer to be passed as an argument.
This considerably speeds up Compare and CompareString.  This change also eliminates
the need to reinitialize the normalization buffer for each use of an iter. This
also significantly improves performance for Key and KeyString.

R=r, rsc
CC=golang-dev
https://golang.org/cl/6842050
src/pkg/exp/locale/collate/collate.go
src/pkg/exp/locale/collate/collate_test.go
src/pkg/exp/locale/collate/export.go
src/pkg/exp/locale/collate/export_test.go
src/pkg/exp/locale/collate/maketables.go
src/pkg/exp/locale/collate/regtest.go
src/pkg/exp/locale/collate/table_test.go
src/pkg/exp/locale/collate/tools/colcmp/col.go