[cvs] commit: horde/lib/Image png.php
Mike Cochrane
mike at graftonhall.co.nz
Mon Feb 10 07:43:34 PST 2003
mikec 2003/02/10 07:43:34 PST
Modified files:
lib/Image png.php
Log:
Bit of optimization.
FWIW:
$iMax = strlen($input);
for ($i = 0; $i < $iMax; $i++) {
$t = ord($input[$i]);
}
Is faster then:
$iMax = strlen($input) + 1;
$input = unpack('C*', $input
for ($i = 1; $i < $iMax; $i++) {
$t = ord($input[$i]);
}
Ie ord() on a string index is quicker then unkacking the string and getting array indexes.
Revision Changes Path
1.11 +7 -6 horde/lib/Image/png.php
Chora Links:
http://cvs.horde.org/diff.php/horde/lib/Image/png.php?r1=1.10&r2=1.11&ty=u
More information about the cvs
mailing list