in reply to Re^7: "exists $hash{key}" is slower than "$hash{key}"
in thread "exists $hash{key}" is slower than "$hash{key}"

so the ->#NUMBER at the end of the lines are GOTOs and the - labels indicate ignored op-codes?

2 <;> nextstate(main 74 -e:1) v:%,{,469764096 ->3 - <1> ex-exists vK/1 ->4 3 <+> multideref($h{"a"}) vK/EXISTS ->4

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^9: "exists $hash{key}" is slower than "$hash{key}"
by dave_the_m (Monsignor) on Jan 07, 2020 at 17:03 UTC
    Effectively yes. The ->#N is the pointer to the next op to be executed (op_next field), which is often not in the same order as the optree structure. Op nodes displayed as "ex-FOO" are ops that are no longer needed and have been converted into OP_NULL (with any attached data freed), but with their former type still recorded (mainly as a debugging aid). These OP_NULLs are usually removed from the execution path.

    Note that -MO=Concise,-exec shows ops in execution order, which often makes things clearer.

    Dave.