At 12:42 PM +0100 1/20/10, Rene Veerman wrote:
Hi, for http://mediabeez.ws/htmlMicroscope/ (lgpl) i need to make
large complex but _randomly filled_ test-arrays.
Sometimes it's good to look at some of php's built in functions, like
shuffle() and array_rand().
Cheers,
tedd
--
---
this is at least 1000% faster
the crux is that array()+=array() is way faster than any array_merge()
operations.
global $hmGenKeys;
$hmGenKeys = 0;
function htmlMicroscope_generateRandomArray ($maxKeys, $maxDepth,
$maxDuration=-1) {
global $hmGenKeys;
if ($maxKeys!==null) {
$hmGenKeys =
2 matches
Mail list logo