summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-04-19 20:52:24 -0600
committerKarl Williamson <khw@cpan.org>2018-04-20 01:11:53 -0600
commit2d74dcf2f3a03c7d1ea8f589d476186ceea6a76a (patch)
treee1c6ab940b0b4665054f5ad90d9dc4d09aef4671 /regen
parent4eea95a6b7e3bac6eb2bfb977ed22e736b52bf52 (diff)
downloadperl-2d74dcf2f3a03c7d1ea8f589d476186ceea6a76a.tar.gz
regen/mk_invlists.pl: Keep core tables adjacent
The expectation is that most of the Unicode tables won't be used in any given run, and since they reside in the text segment, won't get paged in. But that's not true of the tables used by the perl core. So make them adjacent so that paging one in will get some of the others.
Diffstat (limited to 'regen')
-rw-r--r--regen/mk_invlists.pl55
1 files changed, 51 insertions, 4 deletions
diff --git a/regen/mk_invlists.pl b/regen/mk_invlists.pl
index 506583ee7f..3eb05b5fd0 100644
--- a/regen/mk_invlists.pl
+++ b/regen/mk_invlists.pl
@@ -77,6 +77,50 @@ my %wb_abbreviations;
my @a2n;
+# Output these tables in the same vicinity as each other, so that will get
+# paged in at about the same time
+my %keep_together = (
+ assigned => 1,
+ ascii => 1,
+ cased => 1,
+ vertspace => 1,
+ xposixalnum => 1,
+ xposixalpha => 1,
+ xposixblank => 1,
+ xposixcntrl => 1,
+ xposixdigit => 1,
+ xposixgraph => 1,
+ xposixlower => 1,
+ xposixprint => 1,
+ xposixpunct => 1,
+ xposixspace => 1,
+ xposixupper => 1,
+ xposixword => 1,
+ xposixxdigit => 1,
+ posixalnum => 1,
+ posixalpha => 1,
+ posixblank => 1,
+ posixcntrl => 1,
+ posixdigit => 1,
+ posixgraph => 1,
+ posixlower => 1,
+ posixprint => 1,
+ posixpunct => 1,
+ posixspace => 1,
+ posixupper => 1,
+ posixword => 1,
+ posixxdigit => 1,
+ _perl_any_folds => 1,
+ _perl_folds_to_multi_char => 1,
+ _perl_idstart => 1,
+ _perl_idcont => 1,
+ _perl_charname_begin => 1,
+ _perl_charname_continue => 1,
+ _perl_problematic_locale_foldeds_start => 1,
+ _perl_problematic_locale_folds => 1,
+ _perl_quotemeta => 1,
+ );
+
sub uniques {
# Returns non-duplicated input values. From "Perl Best Practices:
# Encapsulated Cleverness". p. 455 in first edition.
@@ -2110,14 +2154,17 @@ push @props, sort { prop_name_for_cmp($a) cmp prop_name_for_cmp($b) } qw(
# are needed by perl, but aren't in all Unicode releases.
my @bin_props;
+my @bin_prop_defines;
my %enums;
+my @deprecated_messages = ""; # Element [0] is a placeholder
+my %deprecated_tags;
# Collect all the binary properties from data in lib/unicore
# Sort so that complements come after the main table, and the shortest
# names first, finally alphabetically.
foreach my $property (sort
- {
- $a =~ /!/ <=> $b =~ /!/
+ { exists $keep_together{lc $b} <=> exists $keep_together{lc $a}
+ or $a =~ /!/ <=> $b =~ /!/
or length $a <=> length $b
or $a cmp $b
} keys %utf8::loose_to_file_of,
@@ -2151,8 +2198,8 @@ foreach my $property (sort
}
}
-@bin_props = sort {
- $a cmp $b
+@bin_props = sort { exists $keep_together{lc $b} <=> exists $keep_together{lc $a}
+ or $a cmp $b
} @bin_props;
push @props, @bin_props;