summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2003-04-02 13:41:14 +0000
committerArtur Bergman <sky@nanisky.com>2003-04-02 13:41:14 +0000
commit081fc587427bbceff63d5141014aee022b3f9dd6 (patch)
tree40ce68e8875794031a9a20550881c9896268eeea /sv.c
parent6ab58e4d47c419dca1df070f2fa15786b3285750 (diff)
downloadperl-081fc587427bbceff63d5141014aee022b3f9dd6.tar.gz
Add packname->stash cache before the check if a packname is a
filehandle or a package, it works because only packnames that have been resolved to stashes are added to the cache, and when a newIO is created we clean the cache. Results in roughly 1.8 speed increase for class->method() calls. p4raw-id: //depot/perl@19133
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 2ffa0cad10..6ead8bb0f5 100644
--- a/sv.c
+++ b/sv.c
@@ -11397,6 +11397,8 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
/* Pluggable optimizer */
PL_peepp = proto_perl->Tpeepp;
+ PL_stashcache = newHV();
+
if (!(flags & CLONEf_KEEP_PTR_TABLE)) {
ptr_table_free(PL_ptr_table);
PL_ptr_table = NULL;