Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Label makes a sub to return empty list -- "secret"? documented?

by ikegami (Patriarch)
on Sep 13, 2025 at 04:09 UTC ( [id://11166209]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Label makes a sub to return empty list -- "secret"? documented?
in thread Label makes a sub to return empty list -- "secret"? documented?

Sometimes, I prefer to invert the numbers to get the time saved to put things into perspective.

27367269 calls/s = 37 ns/call 31367629 calls/s = 32 ns/call 35161744 calls/s = 28 ns/call

So _: is 9 ns faster than return (assuming the numbers are meaningful).

After 100 million calls, you still wouldn't have saved a second by switching from return to _:.

Update: I had moved a decimal point in the wrong direction. Fixed.

Replies are listed 'Best First'.
Re^4: Label makes a sub to return empty list -- "secret"? documented?
by hippo (Archbishop) on Sep 13, 2025 at 09:26 UTC
    27367269 calls/s = 0.365 ns/call

    I think your numbers are a couple of orders of magnitude out. By my maths 1 / 27367269 = 0.0000000365, so that's 36.5ns per call.

    Even so, your point is valid. It is only in extreme cases where any of this is really worth worrying about.


    🦛

      The numbers seemed absurd, but I was too tired to register I needed to redo the math. I had moved a decimal point in the wrong direction. Fixed.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2026-05-10 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.