develooper Front page | perl.perl5.porters | Postings from September 2000

Re: the door is closed.

Thread Previous
From:
Jarkko Hietaniemi
Date:
September 1, 2000 18:08
Subject:
Re: the door is closed.
Message ID:
20000901200854.B21508@chaos.wustl.edu
On Fri, Sep 01, 2000 at 08:23:16PM -0400, Ben Tilly wrote:
> >Theory: only documentation fixes can any more get in.
> 
> Well this is a documentation fix, based on benchmark results at
> 
> http://www.perlmonks.org/index.pl?node_id=30243
> 
> It seems that the test is a performance loss, and at a guess that
> Tye McQueen made (which I suspect is correct), the only reason
> for it is that if you swap an element with itself with an xor,

With an xor...where is this xor...?

> bad things happen.
> 
> Cheers,
> Ben
> 
> --- perlfaq4.pod.bak    Fri Sep  1 09:03:28 2000
> +++ perlfaq4.pod        Fri Sep  1 09:04:11 2000
> @@ -1189,7 +1189,6 @@
>          my $i;
>          for ($i = @$array; --$i; ) {
>              my $j = int rand ($i+1);
> -            next if $i == $j;
>              @$array[$i,$j] = @$array[$j,$i];
>          }
>      }

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About