Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: Puzzle: The Ham Cheese Sandwich cut.

by robin (Chaplain)
on Nov 21, 2005 at 19:39 UTC ( #510542=note: print w/replies, xml ) Need Help??


in reply to Re^4: Puzzle: The Ham Cheese Sandwich cut.
in thread Puzzle: The Ham Cheese Sandwich cut.

In fact I'm wrong in any case. A naive recursive call seems to be just a hair faster than the goto, even when finding the median of a million-element list.

As you suggest, the fastest of all is to simply call the sub with an ampersand, but really the difference is very small. I wonder whether this is running into unshift's worst-case performance.

Premature optimization and all that…

  • Comment on Re^5: Puzzle: The Ham Cheese Sandwich cut.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://510542]
help
Chatterbox?
[Lady_Aleena]: I wish I could think of a simple script to find out what modules my modules use (if any and including my other modules) and whicch of my modules use my modules (if any).

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-05-26 23:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?