diff options
author | Karl Williamson <public@khwilliamson.com> | 2014-03-18 12:17:16 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2014-03-18 12:51:23 -0600 |
commit | 3b4a0b12402af05544d538a5e3f23b6e83cf565f (patch) | |
tree | 0115e8a921154e8946043774ab6b8af6dae09092 /lib | |
parent | cf13ddc5efb78ce6d588441978947303e5baf1d8 (diff) | |
download | perl-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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicore/mktables | 2 |
1 files changed, 1 insertions, 1 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; |