summaryrefslogtreecommitdiff
path: root/regen/ebcdic.pl
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2014-06-10 16:18:34 +1000
committerTony Cook <tony@develop-help.com>2014-06-18 10:47:30 +1000
commitc30a0cf2fdbe81e28e7b5cd87a818bee7ac46dc8 (patch)
tree8a3b127f796ff5251d3622f99d0271eae5109cb3 /regen/ebcdic.pl
parente0dcdb0a6a47e7be80138333509b94c176bdfbe7 (diff)
downloadperl-c30a0cf2fdbe81e28e7b5cd87a818bee7ac46dc8.tar.gz
avoid copying the while ebcidic mapping to the stack calling get_a2n()
from 41.6sec to 34.1sec get_a2n() is called 181540 times by __uni_latin1() which in most cases doesn't use the whole table. Other callers tend to use the whole table, so make a copy.
Diffstat (limited to 'regen/ebcdic.pl')
-rw-r--r--regen/ebcdic.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/regen/ebcdic.pl b/regen/ebcdic.pl
index 60b74aa0ca..0f66230819 100644
--- a/regen/ebcdic.pl
+++ b/regen/ebcdic.pl
@@ -39,7 +39,8 @@ END
my @charsets = get_supported_code_pages();
shift @charsets; # ASCII is the 0th, and we don't deal with that here.
foreach my $charset (@charsets) {
- my @a2e = get_a2n($charset);
+ # we process the whole array several times, make a copy
+ my @a2e = @{get_a2n($charset)};
print $out_fh "\n" . get_conditional_compile_line_start($charset);
print $out_fh "\n";