in reply to Re: Sorting strings
in thread Sorting strings

Some things go wrong with your code

-- Hofmator

Replies are listed 'Best First'.
Re: Re: Re: Sorting strings
by ChemBoy (Priest) on Aug 30, 2001 at 18:54 UTC

    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.



    If God had meant us to fly, he would *never* have given us the railroads.
        --Michael Flanders