From 4e8879f34cd1f40280a3be7b04ebda760dcaf0f2 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Sun, 13 Nov 2016 14:59:32 +0000 Subject: reduce cost of SvVALID() Now that SvVALID() no longer just checks an SV flag, but instead checks for the existence of a certain type of magic, avoid using this more expensive macro when its not really needed. Also, and an extra flag test to SvVALID() to make it fail quicker. --- gv.h | 1 - 1 file changed, 1 deletion(-) (limited to 'gv.h') diff --git a/gv.h b/gv.h index 0b08b686f7..488f2cc87f 100644 --- a/gv.h +++ b/gv.h @@ -52,7 +52,6 @@ struct gp { (*({ GV * const _gvname_hek = (GV *) (gv); \ assert(isGV_with_GP(_gvname_hek)); \ assert(SvTYPE(_gvname_hek) == SVt_PVGV || SvTYPE(_gvname_hek) >= SVt_PVLV); \ - assert(!SvVALID((SV*)_gvname_hek)); \ &(GvXPVGV(_gvname_hek)->xiv_u.xivu_namehek); \ })) # define GvNAME_get(gv) ({ assert(GvNAME_HEK(gv)); (char *)HEK_KEY(GvNAME_HEK(gv)); }) -- cgit v1.2.1