Exemple #1
0
<?php

require __DIR__ . '/../benchmark.php';
$vector = new Icecave\Collections\Vector();
Benchmark::run(50000, null, function ($i) use($vector) {
    $vector->pushBack($i);
});
Exemple #2
0
<?php

require __DIR__ . '/../benchmark.php';
$vector = new Icecave\Collections\Vector();
Benchmark::run(50000, null, function ($i) use($vector) {
    $vector->pushFront($i);
});
Exemple #3
0
<?php

require __DIR__ . '/../benchmark.php';
$vector = new Icecave\Collections\Vector();
Benchmark::run(1000, function ($i) use($vector) {
    $vector->pushFront($i);
}, function ($i) use($vector) {
    $vector->popFront();
});
Exemple #4
0
<?php

require __DIR__ . '/../benchmark.php';
$vector = new Icecave\Collections\Vector();
Benchmark::run(50000, function ($i) use($vector) {
    $vector->pushBack($i);
}, function ($i) use($vector) {
    $vector->popBack();
});