Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^8: "exists $hash{key}" is slower than "$hash{key}"

by LanX (Saint)
on Jan 07, 2020 at 16:00 UTC ( [id://11111137]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11111137]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-25 15:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found