git.postgresql.org Git - postgresql.git/commit
Fri, 9 Oct 2015 23:03:44 +0000 (19:03 -0400)
Fri, 9 Oct 2015 23:03:44 +0000 (19:03 -0400)
commit 0e57b4d8bd9674adaf5747421b3255b85e385534
Speed up text sorts where the same strings occur multiple times.
Cache strxfrm() blobs across calls made to the text SortSupport
abbreviation routine. This can speed up sorting if the same string
needs to be abbreviated many times in a row.
Also, cache the result of the previous strcoll() comparison, so that
if we're asked to compare the same strings agin, we do need to call
strcoll() again.
Perhaps surprisingly, these optimizations don't seem to hurt even when
they don't help. memcmp() is really cheap compared to strcoll() or
strxfrm().
Peter Geoghegan, reviewed by me.
This is the main PostgreSQL git repository.
RSS
Atom