On Mar 10, 2005, at 2:06 AM, David Jantzen wrote:

You've nearly got an unrolled Schwartzian Transform (http://perlmonks.org/index.pl?node_id=9108).

I intentionally avoided lumping everything into one huge statement. I've never cared much for ST's ...


# Now onto the magic of the ST: map/sort/map. (Read from bottom to top)

... and that, in a nutshell, is why. Code that's written backwards is harder to understand.


Still, I'm curious to know if there's a significant performance gain to be had by using an ST in this case. I have my doubts, but if there is, then the added complexity is a reasonable price to pay for it. It's not a matter of dogma, just trade-offs - I see no reason to add complexity unless there's something to be gained in return.

Hard to tell without a much larger data set though. Mark, would there be any chance of you running the two versions and comparing them? Or of posting a larger sample data set so I can compare them?

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org



Reply via email to