Re: An useful addition to sort.e

new topic     » topic index » view thread      » older message » newer message

Jason Gade wrote:
> 
> Matt Lewis wrote:
> > I've often coded:
> > }}}
<eucode>
> > s = - sort( -s )
> > </eucode>
{{{

> Huh, I haven't tested that but... wouldn't that take longer than reverse() by
> some constant factor? I mean, first the -1 has to propagate through the
> sequence
> argument and then it has to propagate again through the sorted sequence.
> 
> Interesting though. Probably worth testing.
> 

It's possible, although it's always been fast enough for me.  I think it's
pretty rare to have to frequently do a sort, so it's not particularly time
critical.  It probably also depends on the size of the data that's being
sorted.

Matt

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu