@ 2014-09-21T16:46:37Z <?php
$pivot = [];
$n = 0;
for ($i = 1; $i <= 100; $i++) {
$pivot[$i] = [];
}
for($i = 1; $i <= 100; $n++) {
$user = &$pivot[rand($i, 100)];
$rand = rand(0, 100);
$random = $rand != $user ? $rand : $rand + 1;
while(array_key_exists($random, $user)) {
$random++;
}
$user[] = $random;
if($n == 100) {
$i++;
$n = 0;
}
}
foreach($pivot as $key => $piv) {
echo "INSERT INTO `following_pivot` (`uid`, `fid`) VALUES ";
foreach($piv as $pi) {
echo "(", $key, ", ", $pi, ")";
if($pi !== end($piv)) {
echo ",";
}
}
echo ";";
}
//print_r($pivot);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 7.2.10 0.131 0.031 15.82 7.2.9 0.130 0.023 15.81 7.2.8 0.144 0.044 15.68 7.2.7 0.149 0.042 15.91 7.2.6 0.114 0.038 15.84 7.2.5 0.066 0.019 15.87 7.1.22 0.047 0.047 14.73 7.1.21 0.119 0.052 14.67 7.1.20 0.138 0.053 14.87 7.1.19 0.054 0.061 14.84 7.1.18 0.165 0.033 14.60 7.0.31 0.174 0.054 14.22 5.6.38 0.046 1.338 15.88 5.6.37 0.020 2.328 15.44
preferences:dark mode live preview
32.53 ms | 401 KiB | 5 Q