http://qs1969.pair.com?node_id=510542


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…