|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-11-27 04:47 UTC] bartvb at iae dot nl
A call to uniqid() seems to take approximately 20ms. In all that time the processor seems to be doing absolutely nothing (well, it seems to be waiting for something). I wrote a convert script which uses uniqid() while testing it it took 40 seconds to convert 1600 items, without uniqid() the time went down to 3 seconds.. Quite a remarkable performance boost ;) Especially since the script was made to convert around 300.000 items. Please speed up this function.. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 02:00:01 2025 UTC |
Here is what I noticed : A call to uniqid("") takes between 12 and 20 ms. A call to uniqid("",1) is extremely fast (below 1 ms). In the code the only difference is, with no entropy, "usleep(1)". That's not explain the difference I found. Why is it so long without entropy?