From: Karl Williamson Date: Tue, 18 Mar 2014 18:17:16 +0000 (-0600) Subject: mktables: In-line defns for tables up to 3 ranges X-Git-Tag: upstream/5.20.0~201 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b4a0b12402af05544d538a5e3f23b6e83cf565f;p=platform%2Fupstream%2Fperl.git 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. --- diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 11b3231..cde1922 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 ba59a42..548cb32 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