Optimisation

Kent Fredric kentfredric at gmail.com
Mon Mar 2 22:17:01 GMT 2009


On Tue, Mar 3, 2009 at 11:02 AM, Nigel Peck <nigel.peck at miswebdesign.com>wrote:

>
>
> Sorry for the noob questions, but if these are being compared against each
> other, why are the percentages different?
>
>
Basic Math.

 50 vs 60  =   50/60  and 60/50  .

 50 / 60 = 0.83 and 60/50 = 1.2

1456355 / 1203020
1.2105825339  = 21.0 % faster

1203020 / 1456355
.8260485939

1.0 - 0.82  = 0.174  =  17.4% slower.

A common confusion people have  is  ( $y  - %5 ) + 5% == $y , but it
doesn't.

100 * 0.95 = 95
95 * 1.05 =  99.75


-- 
Kent

perl -e  "print substr( \"edrgmaM  SPA NOcomil.ic\\@tfrken\", \$_ * 3, 3 )
for ( 9,8,0,7,1,6,5,4,3,2 );

http://kent-fredric.fox.geek.nz


More information about the london.pm mailing list