<?php require __DIR__ . '/../benchmark.php'; $vector = new Icecave\Collections\Vector(); Benchmark::run(50000, null, function ($i) use($vector) { $vector->pushBack($i); });
<?php require __DIR__ . '/../benchmark.php'; $vector = new Icecave\Collections\Vector(); Benchmark::run(50000, null, function ($i) use($vector) { $vector->pushFront($i); });
<?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(); });
<?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(); });