[dev] Re: [cvs] commit: horde/lib/MIME Contents.php Part.php

Chuck Hagenbuch chuck at horde.org
Thu Jan 9 09:26:32 PST 2003


Quoting Michael M Slusarz <slusarz at bigworm.colorado.edu>:

>   Log:
>   Avoid uniqid() like the plague! It takes an average of 20 ms _per call_. 
>   A much faster solution (my quick tests) is to use crc32() & microtime()
>   instead. If we need a 32 *character* string (e.g. a boundary string), it 
>   is ok to still use md5(). (My quick tests show that md5() is about 3x 
>   slower than crc32(). Both are approx *700* times faster than uniqid()).

Huh! Thanks for doing the tests and noticing this, Michael!

Anyone want to volunteer to rip out our other uniqid() calls where possible? :)

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
must ... find ... acorns ... *thud*


More information about the dev mailing list