Do you know where your variables are? | |
PerlMonks |
Re: Schwartzian Transform vs. Building Hash of Function Results, Then Sorting on Function Resultsby Limbic~Region (Chancellor) |
on Oct 16, 2006 at 19:10 UTC ( [id://578573]=note: print w/replies, xml ) | Need Help?? |
davebaker,
In both cases, you are calculating the expensive_func() only once per item and sorting the list based off the result of the expensive_func(). The biggest difference is that in the standard ST, you do it in a single step and have no left over variable. Cheers - L~R
In Section
Cool Uses for Perl
|
|