The sort(1) manpage mentions the LC_* environment variables and how they affect sorting and efficiency, but we only support LC_CTYPE, right? Would it be an omprovement to remove these from the manpage?
Jan Index: sort.1 =================================================================== RCS file: /cvs/src/usr.bin/sort/sort.1,v retrieving revision 1.54 diff -u -p -r1.54 sort.1 --- sort.1 5 Apr 2015 14:20:22 -0000 1.54 +++ sort.1 7 Oct 2016 10:37:14 -0000 @@ -56,9 +56,8 @@ newline (default) or NUL \'\\0\' charact A record can contain any printable or unprintable characters. Comparisons are based on one or more sort keys extracted from each line of input, and are performed lexicographically, -according to the current locale's collating rules and the -specified command-line options that can tune the actual -sorting behavior. +according to the command-line options +that can tune the actual sorting behavior. By default, if keys are not given, .Nm uses entire lines for comparison. @@ -173,10 +172,6 @@ Unknown strings are considered smaller t .It Fl n , Fl Fl numeric-sort, Fl Fl sort=numeric An initial numeric string, consisting of optional blank space, optional minus sign, and zero or more digits (including decimal point) -.\" with -.\" optional radix character and thousands -.\" separator -.\" (as defined in the current locale), is sorted by arithmetic value. Leading blank characters are ignored. .It Fl R, Fl Fl random-sort, Fl Fl sort=random @@ -494,43 +489,6 @@ which has no equivalent. .Sh ENVIRONMENT .Bl -tag -width Fl -.It Ev GNUSORT_NUMERIC_COMPATIBILITY -If defined -.Fl t -will not override the locale numeric symbols, that is, thousand -separators and decimal separators. -By default, if we specify -.Fl t -with the same symbol as the thousand separator or decimal point, -the symbol will be treated as the field separator. -Older behavior was less definite: the symbol was treated as both field -separator and numeric separator, simultaneously. -This environment variable enables the old behavior. -.It Ev LANG -Used as a last resort to determine different kinds of locale-specific -behavior if neither the respective environment variable nor -.Ev LC_ALL -are set. -.It Ev LC_ALL -Locale settings that override all of the other locale settings. -This environment variable can be used to set all these settings -to the same value at once. -.It Ev LC_COLLATE -Locale settings to be used to determine the collation for -sorting records. -.It Ev LC_CTYPE -Locale settings to be used to case conversion and classification -of characters, that is, which characters are considered -whitespaces, etc. -.It Ev LC_MESSAGES -Locale settings that determine the language of output messages -that -.Nm -prints out. -.It Ev LC_NUMERIC -Locale settings that determine the number format used in numeric sort. -.It Ev LC_TIME -Locale settings that determine the month format used in month sort. .It Ev TMPDIR Path to the directory in which temporary files will be stored. Note that @@ -624,13 +582,10 @@ This implementation of has no limits on input line length (other than imposed by available memory) or any restrictions on bytes allowed within lines. .Pp -The performance depends highly on locale settings, +The performance depends highly on efficient choice of sort keys and key complexity. -The fastest sort is with the C locale, on whole lines, with option +The fastest sort is on whole lines, with option .Fl s . -In general, the C locale is the fastest, followed by single-byte -locales with multi-byte locales being the slowest. -The correct collation order respected in all cases. For the key specification, the simpler to process the lines the faster the search will be. .Pp