in reply to Re: Re: Sorting strings
in thread Sorting strings
I'd be hesitant to say that running that calculation more than once per value is something "wrong" with the code--as was pointed out to me by jeroenes, for sorting a small number of elements, the Schwartzian doesn't buy you anything significant (especially for a cheap calculation like this one). Of course, if N gets larger, then the benefits of using it increase, so ++ for posting it: I just don't think it's necessarily called for here.
|
|---|