From: Malcolm Beattie Date: Wed, 6 May 1998 13:08:29 +0000 (+0000) Subject: Speed up pp_entersub for usethreads with only 1 thread running. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=74e0acbb31982af9aba21d79d9a6b38099be26a2;p=p5sagit%2Fp5-mst-13.2.git Speed up pp_entersub for usethreads with only 1 thread running. p4raw-id: //depot/perl@915 --- diff --git a/pp_hot.c b/pp_hot.c index 0422605..8361452 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -1989,8 +1989,9 @@ PP(pp_entersub) * (3) instead of (2) so we'd have to clone. Would the fact * that we released the mutex more quickly make up for this? */ - svp = hv_fetch(thr->cvcache, (char *)cv, sizeof(cv), FALSE); - if (svp) { + if (threadnum && + (svp = hv_fetch(thr->cvcache, (char *)cv, sizeof(cv), FALSE))) + { /* We already have a clone to use */ MUTEX_UNLOCK(CvMUTEXP(cv)); cv = *(CV**)svp;