summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2014-03-18 12:17:16 -0600
committerKarl Williamson <public@khwilliamson.com>2014-03-18 12:51:23 -0600
commit3b4a0b12402af05544d538a5e3f23b6e83cf565f (patch)
tree0115e8a921154e8946043774ab6b8af6dae09092
parentcf13ddc5efb78ce6d588441978947303e5baf1d8 (diff)
downloadperl-3b4a0b12402af05544d538a5e3f23b6e83cf565f.tar.gz
mktables: In-line defns for tables up to 3 ranges
eb0925341cc65ce6ce57503ec0ab97cdad39dc98 caused the definitions for about 45% of the Unicode tables to be placed in-line in Heavy.pl instead of them having to be read-in from disk. This new commit extends that so that about 55% are in-lined, by in-lining tables which consist of up to 3 ranges. This is a no-brainer to do, as the memory usage does not increase by doing it, and disk accesses go down. I used the delta in the disk size of Heavy.pl as a proxy for the delta in the memory size that it uses, as what this commit does is to change various scalar strings in it. Doing this measurement indicates that this commit results in a slightly smaller Heavy.pl than what was there before eb092534. The amounts will vary between Unicode releases. I also checked for Unicode beta 7.0, and the sizes are again comparable, with a slightly larger Heavy.pl for the 3-range version there. For 4-, 5-, ... range tables, doing this results in slowly increasing Heavy.pl size (and hence more and more memory use), and that is something we may wish to look at in the future, trading memory for fewer files and less disk start-up cost. But for the imminent v5.20, doing it for 3-range tables doesn't cost us anything, and gains us fewer disk files and accesses.
-rw-r--r--lib/unicore/mktables2
-rw-r--r--pod/perldelta.pod2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index 11b323165b..cde1922d67 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -17349,7 +17349,7 @@ sub write_all_tables() {
if (! $is_property
&& ! $annotate # For annotation, we want to explicitly show
# everything, so keep in files
- && $table->ranges <= 1)
+ && $table->ranges <= 3)
{
my @ranges = $table->ranges;
my $count = @ranges;
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index ba59a42fc2..548cb32c80 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -135,7 +135,7 @@ of the implementation, including subroutine invocation and scope exit.
=item *
Perl now does less disk I/O when dealing with Unicode properties that cover
-only a single range of consecutive code points.
+up to three ranges of consecutive code points.
=back