Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: Preferred technique for named subroutine parameters?

by shmem (Chancellor)
on May 23, 2009 at 11:30 UTC ( [id://765817]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Preferred technique for named subroutine parameters?
in thread Preferred technique for named subroutine parameters?

Yes, of course. Your benchmark is even more appropriate to show the overhead, which consists in creating, populating and destroying a hash (call with hashref) vs. populating a hash already allocated on the subroutine's pad (call with list).

Might be small, but might sum up. Call it a micro-de-optimization, but I see no value in making perl slower for a questionable gain and a loss of readability.

  • Comment on Re^4: Preferred technique for named subroutine parameters?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (10)
As of 2024-04-18 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found