[JOB] Perl Software Developer and Database programmer

Jacqui Caren jacqui.caren at ntlworld.com
Wed Feb 22 22:39:04 GMT 2006


McGlinchy, Alistair wrote:
> Ovid proposed:
> 
>>  Imagine we're building an app and it turns out to be slow.  We've
>>  profiled the code and reduced the problem down to this:
>>
>>    foreach my $alpha ( @alphas ) {
>>        foreach my $beta ( @betas ) {
>>            if ( $alpha == $beta ) {
>>                push @results, $beta;
>>            }
>>        }
>>    }
>>
>>  1.  What is a likely reason for the performance problem?
>>  2.  How might we speed it up?
> 
> 
> That is a really peculiar piece of code! It is highly deceptive as, at

Does anyone here read the dailyWTF? ;-)




More information about the london.pm mailing list