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


in reply to Re: Benchmark, -s versus schwartzian
in thread Benchmark, -s versus schwartzian

Yes, the -s example is a simple example, but doesn't necessarily highlight the ST. The point of the section is to talk about the expense of the comparison function, and one possible solution. I chose -s, because it's easy to talk about, and the ST, because it's the most straightforward general solution. Certainly, in specialized cases, a simple array cache or hash cache or GRT might be better.

In a tutorial, I'm constantly weighing how much or how little to say to accomplish some level of understanding for the tasks at hand. It's trickier than it looks, as anyone who has written training materials can confirm.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.