Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap the ordering of two locale category indices
Perl internally uses a mapping of locale category values into a consecutive sequence of indices starting at 0. These are used as indexes into arrays. The reason is that the category numbers are opaque, vary by platform, aren't necessarily sequential, and hence are hard to make table driven code for. This commit makes the LC_CTYPE index 0, and LC_NUMERIC equal to 1; swapping them. The reason is to cause LC_CTYPE to get done first in the many loops through the categories. The UTF8ness of categories is an often needed value, and most of the time the categories will have the same locale. LC_CTYPE is needed to calculate the UTF8ness, and by doing it first and caching the result, the other categories likely automatically will use the same value, without having to recalculate.
- Loading branch information
1 parent
91d6689
commit 29a7b0d
Showing
2 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters