Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Ampersands and sub speed

by wazoox (Prior)
on Oct 14, 2005 at 21:13 UTC ( [id://500370]=note: print w/replies, xml ) Need Help??


in reply to Ampersands and sub speed

I suppose this is because the ampersand identifies the token as a function name, and so Perl doesn't have to spend any time disambiguating it

No, I don't think it to be the reason. AFAIK the difference lies in the fact that object methods can be overloaded, or inherited, and this is managed at run time, while direct function call is managed thru the symbol table built directly at compile time.

Replies are listed 'Best First'.
Re^2: Ampersands and sub speed
by creamygoodness (Curate) on Oct 14, 2005 at 21:51 UTC
    The difference between the overloadable method calling convention and the non-overloadable function calling convention is what I originally set out to measure. The ampersand variation, which was what surprised me, is limited to the function calling convention in the sample code.
    --
    Marvin Humphrey
    Rectangular Research ― http://www.rectangular.com
      Oh sorry, I'm afraid I've read your post too quickly :)
      This one is really tricky.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-24 22:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found