Skip to content

Instantly share code, notes, and snippets.

@nanasess
Created August 22, 2016 05:17
Show Gist options
  • Save nanasess/3c4f6eba68ffe38016c9cb1694d84395 to your computer and use it in GitHub Desktop.
Save nanasess/3c4f6eba68ffe38016c9cb1694d84395 to your computer and use it in GitHub Desktop.
benchmark of YamlParse vs PHP array
<?php
require __DIR__.'/../autoload.php';
$app = \Eccube\Application::getInstance(array('output_config_php' => false));
$start = microtime(true);
for ($i = 0; $i < 1000; $i++) {
$configAll = array();
$app->parseConfig('constant', $configAll)
->parseConfig('path', $configAll)
->parseConfig('config', $configAll)
->parseConfig('database', $configAll)
->parseConfig('mail', $configAll)
->parseConfig('log', $configAll)
->parseConfig('nav', $configAll, true)
->parseConfig('doctrine_cache', $configAll);
}
$end = microtime(true);
print($end - $start);
@nanasess
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment