sort: speed up -R with long lines in hard locales
commitad31a59a370e29f38864a747045da10c82d6c912
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 9 Aug 2010 06:14:38 +0000 (8 23:14 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 9 Aug 2010 06:15:09 +0000 (8 23:15 -0700)
tree033f522838276d0a62da69784109f8fcbde7e1c3
parentb877ea4b3ee4c62ab75caedbfdcca4877961aedf
sort: speed up -R with long lines in hard locales

* src/sort.c (compare_random): Guess that the output will be
3X the input.  This avoids the overhead of calling strxfrm
twice on typical implementations.  Suggested by Bruno Haible.
src/sort.c