develooper Front page | perl.perl5.porters | Postings from July 2004

Re: optimizing Short circuiting sort method based on [M]

Thread Previous | Thread Next
Glenn Linderman
July 1, 2004 13:51
Re: optimizing Short circuiting sort method based on [M]
Message ID:
On approximately 7/1/2004 3:02 AM, came the following characters from
the keyboard of Orton, Yves:

> I think this is not unusual nor are top N. The only thing is the later is
> IMO more often written like
>   @array=(sort @foo)[0..9];
> And not like
>   ($one,$two,$three)=sort @foo;
> As for anything more than a few elements the latter style is a real pain.
> Dunno if this is an important consideration but I thought I'd point it out.

That is another type of source for "hint", and thanks for pointing out 
the technique.

Glenn --
The best part about procrastination is that you are never bored,
because you have all kinds of things that you should be doing.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About