Re: An useful addition to sort.e
- Posted by Matt Lewis <matthewwalkerlewis at gmail.??m> Aug 01, 2007
- 459 views
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