Re: Bug #14248: uniqid() is extremely slow (20ms per call)
| From: | Andrey Hristov | Date: | Tue, 27 Nov 2001 10:00:15 +0000 |
| Subject: | Re: Bug #14248: uniqid() is extremely slow (20ms per call) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-71757@lists.php.net to get a copy of this message | ||
I looked at php_combined_lcg() and saw that it uses LCG, it looks like a macro but I've found
anywhere else in the source.
I looked at the source to view how session_id is generated (using seconds, microseconds, and
php_combined_lcg -> standard/lcg.c)
Thanks in advance
Andrey Hristov
----- Original Message -----
From: "Derick Rethans" <d.rethans@jdimedia.nl>
To: "Teodor Cimpoesu" <teo@gecadsoftware.com>
Cc: <php-dev@lists.php.net>; <bartvb@iae.nl>
Sent: Tuesday, November 27, 2001 11:54 AM
Subject: Re: [PHP-DEV] Bug #14248: uniqid() is extremely slow (20ms per call)
> On Tue, 27 Nov 2001, Teodor Cimpoesu wrote:
>
> > I guess it gets entropy from /dev/[u]random, but when it is exhausted it
> > cannot do much but to wait for more entropy.
>
> Wrong guess, it does not. It gets it from time() and the php_combined_lcg
> (which is feeded by the the PID/thread id and some time value).
>
> Derick
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>