td => sub { my $q = POE::Queue::Array->new; for (@input) { $_ == 0 && $q->enqueue(-1000,$_)&& next; $q->enqueue(-1/$_,$_); } my @out; while (my @l = $q->dequeue_next()) { push @out,$l[2]; } Compare(\@out,\@output) or die "@out" if DO_CHECK; }
In reply to Re: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
by trippledubs
in thread Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
by haukex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |