From 3905af2ed3037224909d47a2e5a14940cd14cb22 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 20 Nov 2010 11:44:07 -0800 Subject: S_hfreeentries: keep OOK off unless adding something to aux This small optimisation allows hv_undef to skips its if(SvOOK()) block and all the checks inside it much of the time. --- hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hv.c') diff --git a/hv.c b/hv.c index 376b5dcf49..fb9dfec1be 100644 --- a/hv.c +++ b/hv.c @@ -1803,7 +1803,7 @@ S_hfreeentries(pTHX_ HV *hv) HvARRAY(hv) = orig_array; - if (has_aux) + if (has_aux && current_aux) SvFLAGS(hv) |= SVf_OOK; else SvFLAGS(hv) &=~SVf_OOK; -- cgit v1.2.1