Advertisement
Tuurlijk

Trim Explode Test

Jan 17th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 22.42 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL & ~E_NOTICE);
  3. /*****************************************************************************
  4.  *  Copyright notice
  5.  *
  6.  *  ⓒ 2013 Michiel Roos <michiel@maxserv.nl>
  7.  *  All rights reserved
  8.  *
  9.  *  This script is part of the TYPO3 project. The TYPO3 project is free
  10.  *  software; you can redistribute it and/or modify it under the terms of the
  11.  *  GNU General Public License as published by the Free Software Foundation;
  12.  *  either version 2 of the License, or (at your option) any later version.
  13.  *
  14.  *  The GNU General Public License can be found at
  15.  *  http://www.gnu.org/copyleft/gpl.html.
  16.  *
  17.  *  This script is distributed in the hope that it will be useful, but
  18.  *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  19.  *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  20.  *  more details.
  21.  *
  22.  *  This copyright notice MUST APPEAR in all copies of the script!
  23.  ****************************************************************************/
  24.  
  25. /*****************************************************************************
  26.  *                    Tiny TYPO3 Test Suite v 1.0.0
  27.  *                           by: Michiel Roos
  28.  *                          _______
  29.  *                         /_  __(_)___  __  __
  30.  *                          / / / / __ \/ / / /
  31.  *                         / / / / / / / /_/ /
  32.  *                        /_/ /_/_/ /_/\__, /
  33.  *                                  /____/
  34.  *                   ________  ______  ____ _____
  35.  *                  /_  __/\ \/ / __ \/ __ \__  /
  36.  *                   / /    \  / /_/ / / / //_ <
  37.  *                  / /     / / ____/ /_/ /__/ /
  38.  *                 /_/     /_/_/    \____/____/
  39.  *             ______          __     _____       _ __
  40.  *            /_  __/__  _____/ /_   / ___/__  __(_) /____
  41.  *             / / / _ \/ ___/ __/   \__ \/ / / / / __/ _ \
  42.  *            / / /  __(__  ) /_    ___/ / /_/ / / /_/  __/
  43.  *           /_/  \___/____/\__/   /____/\__,_/_/\__/\___/
  44.  *
  45.  *           https://github.com/Tuurlijk/TinyTypo3TestSuite
  46.  *
  47.  ****************************************************************************/
  48.  
  49. /*****************************************************************************
  50.  * Setup
  51.  *
  52.  * - testname: Displayed in the page title and page header
  53.  * - runs    : The default number of runs
  54.  * - skipSets: An array of setNames to skip
  55.  ****************************************************************************/
  56. $testName = '\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode()';
  57. $runs = 100;
  58. $skipSets = array('set4', 'set5');
  59.  
  60. /*****************************************************************************
  61.  * Parameter Sets
  62.  *
  63.  * Define multiple parameter sets here so you can excersise the method well.
  64.  * Each method needs a description. The other parameters must match the
  65.  * parameter names of the method.
  66.  ****************************************************************************/
  67. $parameterSets = array(
  68.     'set1' => array (
  69.         'description' => 'CSV, no removeEmpty, no limit',
  70.         'delim' => ',',
  71.         'string' => 'a, b, c, ,d, e, f',
  72.         'removeEmptyValues' => FALSE,
  73.         'limit' => 0,
  74.     ),
  75.     'set2' => array (
  76.         'description' => 'CSV, removeEmpty, no limit',
  77.         'delim' => ',',
  78.         'string' => 'a, b, c, ,d, e, f',
  79.         'removeEmptyValues' => TRUE,
  80.         'limit' => 0,
  81.     ),
  82.     'set3' => array (
  83.         'description' => 'CSV, no removeEmpty, limit 3',
  84.         'delim' => ',',
  85.         'string' => 'a, b, c, ,d, e, f',
  86.         'removeEmptyValues' => FALSE,
  87.         'limit' => 3,
  88.     ),
  89.     'set4' => array (
  90.         'description' => 'CSV, removeEmpty, limit -3',
  91.         'delim' => ',',
  92.         'string' => 'a, b, c, ,d, e, f',
  93.         'removeEmptyValues' => TRUE,
  94.         'limit' => -3,
  95.     ),
  96.     'set5' => array (
  97.         'description' => 'LF, removeEmpty, limit -3',
  98.         'delim' => ',',
  99.         'string' => ' a , b , ' . PHP_EOL . ' ,d ,,  e,f,',
  100.         'removeEmptyValues' => TRUE,
  101.         'limit' => -3,
  102.     ),
  103.     'set6' => array (
  104.         'description' => 'Keep 0, removeEmpty, no limit',
  105.         'delim' => ',',
  106.         'string' => 'a , b , c , ,d ,, ,e,f, 0 ,',
  107.         'removeEmptyValues' => TRUE,
  108.         'limit' => 0,
  109.     ),
  110.     'set7' => array (
  111.         'description' => 'MarkerArray with | character',
  112.         'delim' => '|',
  113.         'string' => '###|###',
  114.         'removeEmptyValues' => TRUE,
  115.         'limit' => 0,
  116.     ),
  117.     'set8' => array (
  118.         'description' => 'String with LF',
  119.         'delim' => chr(10),
  120.         'string' => '######
  121. jaerljwlerj',
  122.         'removeEmptyValues' => TRUE,
  123.         'limit' => 0,
  124.     ),
  125.  
  126. );
  127.  
  128. /*****************************************************************************
  129.  * Test Methods:
  130.  *
  131.  * Define your test methods here. Name them version1 - version[n].
  132.  * version1 must be the baseline implementation.
  133.  ****************************************************************************/
  134.  
  135. $descriptions['version1'] = 'Baseline trimExplode';
  136. function version1($delim, $string, $removeEmptyValues = FALSE, $limit = 0) {
  137.     $explodedValues = explode($delim, $string);
  138.     $result = array_map('trim', $explodedValues);
  139.     if ($removeEmptyValues) {
  140.         $temp = array();
  141.         foreach ($result as $value) {
  142.             if ($value !== '') {
  143.                 $temp[] = $value;
  144.             }
  145.         }
  146.         $result = $temp;
  147.     }
  148.     if ($limit != 0) {
  149.         if ($limit < 0) {
  150.             $result = array_slice($result, 0, $limit);
  151.         } elseif (count($result) > $limit) {
  152.             $lastElements = array_slice($result, $limit - 1);
  153.             $result = array_slice($result, 0, $limit - 1);
  154.             $result[] = implode($delim, $lastElements);
  155.         }
  156.     }
  157.     return $result;
  158. }
  159.  
  160. $descriptions['version2'] = 'Optimized baseline';
  161. function version2($delim, $string, $removeEmptyValues = FALSE, $limit = 0) {
  162.     $result = array_map('trim', explode($delim, $string));
  163.     if ($removeEmptyValues) {
  164.         foreach ($result as $key => $value) {
  165.             if ($value === '') {
  166.                 unset($result[$key]);
  167.             }
  168.         }
  169.     }
  170.     if ($limit > 0 && count($result) > $limit) {
  171.         $result = array_slice($result, 0, $limit - 1);
  172.         $result[] = implode($delim, array_slice($result, $limit - 1));
  173.     } elseif ($limit < 0) {
  174.         $result = array_slice($result, 0, $limit);
  175.     }
  176.     return $result;
  177. }
  178.  
  179. $descriptions['version3'] = 'preg_split';
  180. function version3($delim, $string, $removeEmptyValues = FALSE, $limit = 0) {
  181.     $string = trim($string);
  182.     if ($string === '') {
  183.         return array();
  184.     }
  185.     $flags = NULL;
  186.     $pattern = '/\\s*'. preg_quote($delim, '/') . '\\s*/';
  187.     if ($removeEmptyValues) {
  188.         $flags = PREG_SPLIT_NO_EMPTY;
  189.     }
  190.     return preg_split($pattern, $string, $limit, $flags);
  191. }
  192.  
  193. $descriptions['version4'] = 'preg_split with fallback code for negative limit';
  194. function version4($delim, $string, $removeEmptyValues = FALSE, $limit = 0) {
  195.         if ($limit >= 0) {
  196.             $string = trim($string);
  197.             if ($string === '') {
  198.                 return array();
  199.             }
  200.             $flags = NULL;
  201.             $pattern = '/\\s*'. preg_quote($delim, '/') . '\\s*/';
  202.             if ($removeEmptyValues) {
  203.                 $flags = PREG_SPLIT_NO_EMPTY;
  204.             }
  205.             return preg_split($pattern, $string, $limit, $flags);
  206.         }
  207.         $result = array_map('trim', explode($delim, $string));
  208.         if ($removeEmptyValues) {
  209.             foreach ($result as $key => $value) {
  210.                 if ($value === '') {
  211.                     unset($result[$key]);
  212.                 }
  213.             }
  214.         }
  215.         return array_slice($result, 0, $limit);
  216. }
  217.  
  218. /*****************************************************************************
  219.  * Helper Methods:
  220.  *
  221.  * Add any methods that are needed by any of the test methods here.
  222.  ****************************************************************************/
  223.  
  224.  
  225. /*****************************************************************************
  226.  * System (look, but don't touch ;-) . . . only touch if you must.
  227.  ****************************************************************************/
  228. $v = '1.0.0';
  229. $reverseExecutionOrder = 0;
  230. if (isset($_GET['source']) && $_GET['source']) {
  231.     show_source(__FILE__);
  232.     exit;
  233. }
  234. if (isset($_GET['runs'])) $runs = preg_replace('/[^0-9]/', '', $_GET['runs']);
  235. if (isset($_GET['reverseExecutionOrder'])) $reverseExecutionOrder = intval($_GET['reverseExecutionOrder']);
  236.  
  237. // Prepare
  238. $baselineTimes = $functionsToCall = $times = array();
  239. $allFunctions = get_defined_functions();
  240. $functions = array_filter($allFunctions['user'], create_function('$a','return strpos($a, "version") === 0;'));
  241. if ($reverseExecutionOrder) arsort($functions);
  242. foreach ($functions as $function) {
  243.     $xAxis[] = $function;
  244.     $functionsToCall[$function] = new ReflectionFunction($function);
  245. }
  246.  
  247. // Execute
  248. foreach ($parameterSets as $setName => $parameters) {
  249.     if (in_array($setName, $skipSets)) continue;
  250.     // Description is used later on, so clone the parameters
  251.     $functionParameters = $parameters;
  252.     unset($functionParameters['description']);
  253.     for ($i = 0; $i < $runs; $i++) {
  254.         foreach ($functions as $function) {
  255.             $start = microtime(TRUE);
  256.             $result = $functionsToCall[$function]->invokeArgs($functionParameters);
  257.             $time = microtime(TRUE) - $start;
  258.             if ($function === 'version1') {
  259.                 $baselineTimes[$setName] += $time * 1000;
  260.             }
  261.             if (is_array($result)) {
  262.                 $resultObjects[$setName][$function] = array_slice($result, 0, 20, TRUE);
  263.             } else {
  264.                 $resultObjects[$setName][$function] = $result;
  265.             }
  266.             $times[$setName][$function] += $time * 1000;
  267.         }
  268.     }
  269. }
  270.  
  271. function findFastestTimes($times) {
  272.     $fastestTimes = array();
  273.     foreach ($times as $setName => $timeData) {
  274.         foreach ($timeData as $functionName => $time) {
  275.             if (isset($fastestTimes[$functionName])) {
  276.                 $fastestTimes['overall'][$functionName] += $time;
  277.                 $fastestTimes[$setName][$functionName] += $time;
  278.             } else {
  279.                 $fastestTimes['overall'][$functionName] = $time;
  280.                 $fastestTimes[$setName][$functionName] = $time;
  281.             }
  282.         }
  283.     }
  284.     $fastestTimes = array_filter($fastestTimes, 'asort');
  285.     return $fastestTimes;
  286. }
  287.  
  288. function findWinner($times) {
  289.     $averagedTimes = array();
  290.     foreach ($times as $timeData) {
  291.         foreach ($timeData as $functionName => $time) {
  292.             $averagedTimes[$functionName] += $time;
  293.         }
  294.     }
  295.     asort($averagedTimes);
  296.     return $averagedTimes;
  297. }
  298.  
  299. $averagedTimes = findWinner($times);
  300. $fastestTimes = findFastestTimes($times);
  301.  
  302. /**
  303.  * Format an integer as a time value
  304.  *
  305.  * @param integer $time The value to format
  306.  *
  307.  * @return string
  308.  */
  309. function printSeconds($time) {
  310.     $prefix = '';
  311.     $suffix = 'μs';
  312.     if ($time < 0) {
  313.         $time = abs($time);
  314.         $prefix = '-';
  315.     }
  316.     if ($time === 0) {
  317.         $suffix = '';
  318.     }
  319.     if ($time >= 1000) {
  320.         $time = $time / 1000;
  321.         $suffix = 'ms';
  322.     }
  323.     if ($time >= 1000) {
  324.         $time = $time / 1000;
  325.         $suffix = ' s';
  326.     }
  327.     if ($time >= 60 && $suffix === ' s') {
  328.         $time = $time / 60;
  329.         $suffix = 'min!';
  330.     }
  331.     return $prefix . sprintf("%.2f {$suffix}", $time);
  332. }
  333.  
  334. ?>
  335. <html>
  336. <head>
  337.     <title><?php  echo $testName ?> | Tiny TYPO3 Test Suite v<?php echo $v ?></title>
  338.     <link rel="stylesheet" href="http://wiki.typo3.org/wiki/load.php?debug=false&amp;lang=en&amp;modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.typo3vector&amp;only=styles&amp;skin=typo3vector&amp;*" />
  339.     <style type="text/css">
  340.         h3 {
  341.             border-bottom: 1px solid #dedede;
  342.         }
  343.         h4 {
  344.             font-family: Share;
  345.             font-weight: normal;
  346.         }
  347.     </style>
  348.     <script src="http://code.jquery.com/jquery-2.0.3.min.js" type="text/javascript"></script>
  349.     <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js" type="text/javascript"></script>
  350.     <script src="http://code.highcharts.com/highcharts.js" type="text/javascript"></script>
  351.     <script src="http://code.highcharts.com/modules/exporting.js" type="text/javascript"></script>
  352. </head>
  353. <body>
  354. <div id="content" class="mw-body">
  355.     <h1 id="top"><?php echo $testName ?></h1>
  356.     <form action="<?php echo $_SERVER['SCRIPT_NAME'] ?>">
  357.         <label for="runs">Run the tests how many times?</label>
  358.         <input name="runs" id="runs" value="<?php echo $runs ?>"/>
  359.         <label for="runs"><a href="#help">Reverse execution order?</a></label>
  360.         <input type="checkbox" name="reverseExecutionOrder" id="reverseExecutionOrder" value="1" <?php echo ($reverseExecutionOrder) ? 'checked="checked"' : '' ?>/>
  361.         <input class="submit" type="submit" value="Go!"/>
  362.     </form>
  363.     <div class="timeAveraged" style="float: left;">
  364.         <p>Winner using averaged times over all sets: <strong><?php
  365.             $winner = array_slice($averagedTimes, 0, 1);
  366.             echo key($winner) ?></strong> <?php echo printSeconds(current($winner) / count($times)) ?>.</p>
  367.     <?php
  368.         if (count($parameterSets) > 1) {
  369.             echo '<ul>';
  370.             foreach ($averagedTimes as $function => $time) {
  371.                 echo '<li><b>' . $function . '</b>: ',
  372.                     ' ' . printSeconds($time / count($times)) . '</li>';
  373.             }
  374.             echo '</ul>';
  375.         }
  376.     ?>
  377.     </div>
  378.     <div class="timeFastest" style="margin-left: 50%;">
  379.         <p>The fastest function in any set is <strong><?php
  380.             $winner = array_slice($fastestTimes['overall'], 0, 1);
  381.             echo key($winner) ?></strong> <?php echo printSeconds(current($winner)) ?>.</p>
  382.     <?php
  383.         if (count($parameterSets) > 1) {
  384.             echo '<ul>';
  385.             foreach ($fastestTimes as $set => $functions) {
  386.                 if ($set !== 'overall') {
  387.                     echo '<li><b>' . $set . '</b>: ';
  388.                     $setWinner = array_slice($functions, 0, 1);
  389.                     echo key($setWinner) . ' ' . printSeconds(current($setWinner)) . '</li>';
  390.                 }
  391.             }
  392.             echo '</ul>';
  393.         }
  394.     ?>
  395.     </div>
  396.     <div id="resultGraph" style="min-width: 310px; min-height: 400px; margin: 0 auto"></div>
  397.     <h2>Parameter Sets</h2>
  398.     <?php
  399.         foreach ($times as $setName => $functionData) {
  400.             echo '<h3>' , ucfirst($setName) , '</h3>',
  401.                 '<p>' , $parameterSets[$setName]['description'] , '</p>',
  402.                 '<ul>';
  403.             foreach ($functionData as $function => $time) {
  404.                 $identifier = $setName . '-' . $function;
  405.                 echo '<li><a style="text-decoration: none" href="#', $identifier, '">',
  406.                     ucfirst($function),
  407.                     '</a> ',
  408.                     ': ',
  409.                     sprintf('<span style="min-width: 33px; display: inline-block; text-align: right; font-weight: bold;">%1.2d%%</span> ', $time * 100 / $baselineTimes[$setName]),
  410.                     sprintf('<span style="min-width: 50px; display: inline-block; text-align: right; margin: 0 10px;">%s</span> ', printSeconds($time)),
  411.                     $descriptions[$function],
  412.                     '</li>';
  413.             }
  414.             echo '</ul><h4>Parameters</h4><ul>';
  415.             foreach ($parameterSets[$setName] as $key => $value) {
  416.                 if ($key !== 'description') {
  417.                     if (is_array($value)) {
  418.                         echo '<li>' , $key , ':', '</li>'; var_dump($value);
  419.                     } else {
  420.                         echo '<li>' . $key . ' = ' . (string) $value . '</li>';
  421.                     }
  422.                 } else {
  423.                     $setDescriptions[] = $value;
  424.                 }
  425.             }
  426.             echo '</ul>';
  427.         }
  428.     ?>
  429.     <script>
  430.         /**
  431.          * Format an integer as a time value
  432.          *
  433.          * @param {String} time The value to format in microseconds.
  434.          * @param {Number} decimals The amount of decimals
  435.          *
  436.          * @return string
  437.          */
  438.         function printSeconds(time, decimals) {
  439.            decimals = typeof decimals !== 'undefined' ? decimals : 2;
  440.             var prefix = '',
  441.                 suffix = 'μs';
  442.             if (time < 0) {
  443.                 time = Math.abs(time);
  444.                 prefix = '-';
  445.             }
  446.             if (time == 0) {
  447.                 suffix = '';
  448.             }
  449.             if (time >= 1000) {
  450.                 time = time / 1000;
  451.                 suffix = 'ms';
  452.             }
  453.             if (time >= 1000) {
  454.                 time = time / 1000;
  455.                 suffix = ' s';
  456.             }
  457.             if (time >= 60 && suffix == ' s') {
  458.                 time = time / 60;
  459.                 suffix = 'min!';
  460.             }
  461.             return prefix + Highcharts.numberFormat(time, decimals) + ' ' + suffix;
  462.         }
  463.  
  464.         var baseLineTimes = [<?php echo implode(',', $baselineTimes) ?>];
  465.         var descriptions = ['<?php echo implode("','", array_map('addslashes', $descriptions)) ?>'];
  466.         var setDescriptions = ['<?php echo implode("','", array_map('addslashes', $setDescriptions)) ?>'];
  467.         jQuery(document).ready(function($) {
  468.             $('#resultGraph').highcharts({
  469.                 chart: {
  470.                     zoomType: 'y'
  471.                 },
  472.                 title: {
  473.                     text: '<?php echo $testName ?>'
  474.                 },
  475.                 xAxis: {
  476.                     categories: ['<?php echo implode("','", $xAxis)  ?>'],
  477.                     title: {
  478.                         text: null
  479.                     }
  480.                 },
  481.                 yAxis: {
  482.                     min: 0,
  483.                     title: {
  484.                         text: 'Time (milliseconds)',
  485.                         align: 'high'
  486.                     },
  487.                     labels: {
  488.                         overflow: 'justify',
  489.                         formatter: function() {
  490.                             return printSeconds(this.value);
  491.                         }
  492.                     }
  493.                 },
  494.                 tooltip: {
  495.                     useHTML: true,
  496.                     formatter: function() {
  497.                         return '<strong><a style="text-decoration: none" href="#' + this.point.series.name + '-' + this.point.category + '">' + this.point.series.name + ', ' + descriptions[this.point.x] + '</a></strong><br/>' +
  498.                             setDescriptions[this.series.index] + '<br/>' +
  499.                             printSeconds(this.point.y) +
  500.                             ' (' + Math.ceil(this.point.y * 100 / baseLineTimes[this.point.series.index]) + '%)';
  501.                     }
  502.                 },
  503.                 legend: {
  504.                     enabled: true
  505.                 },
  506.                 credits: {
  507.                     enabled: false
  508.                 },
  509.                 series: [
  510.                     <?php
  511.                     foreach ($times as $setName => $setTimes) {
  512.                         $series[] = "{
  513.                             name: '" . $setName . "',
  514.                             data: [" . implode(',', $setTimes) . "]
  515.                         }";
  516.                     }
  517.                     echo implode(',', $series);
  518.                     ?>
  519.                 ]
  520.             });
  521.             $('#showSourceLink').on('click', function(e) {
  522.                 e.preventDefault();
  523.                 $.ajax({
  524.                     url: '<?php echo $_SERVER['SCRIPT_NAME'] ?>?source=1',
  525.                     cache: false
  526.                 })
  527.                 .done(function(html) {
  528.                     $('.loading').hide();
  529.                     $('#sourceCode').html(html);
  530.                     $('html, body').animate({
  531.                         scrollTop: $("#source").offset().top
  532.                     }, {
  533.                         duration: 2000,
  534.                         easing: 'easeOutBounce'
  535.                     });
  536.                 });
  537.             });
  538.             $('.top').on('click', function(e) {
  539.                 e.preventDefault();
  540.                 $('html, body').animate({
  541.                     scrollTop: $("#top").offset().top
  542.                 }, {
  543.                     duration: 2000,
  544.                     easing: 'easeOutBounce'
  545.                 });
  546.             });
  547.         });
  548.     </script>
  549.     <h2>Data results</h2>
  550.     <?php
  551.         foreach ($times as $setName => $functionData) {
  552.             echo '<h3>' . ucfirst($setName) . '</h3>';
  553.             echo '<p>' . $parameterSets[$setName]['description'] . '</p>';
  554.             echo '<ul>';
  555.             foreach ($parameterSets[$setName] as $key => $value) {
  556.                 if ($key !== 'description') {
  557.                     if (is_array($value)) {
  558.                         echo '<li>' , $key , ':', '</li>'; var_dump($value);
  559.                     } else {
  560.                         echo '<li>' . $key . ' = ' . (string) $value . '</li>';
  561.                     }
  562.                 }
  563.             }
  564.             echo '</ul>';
  565.             foreach ($functionData as $function => $time) {
  566.                 echo '<h4 id="', $setName . '-' . $function, '">', ucfirst($function), '</h4>',
  567.                     '<p>', $descriptions[$function], '</p>';
  568.                 var_dump($resultObjects[$setName][$function]);
  569.             }
  570.         }
  571.     ?>
  572.     <div id="p-personal" role="navigation" class="">
  573.         <ul>
  574.     <?php
  575.     foreach ($resultObjects as $setName => $functionData) {
  576.         foreach ($functionData as $function => $data) {
  577.             echo '<li><a href="#' . $setName . '-' . $function . '">' . ucfirst($setName) . ' - ' . ucfirst($function)  . '</a></h3>';
  578.         }
  579.     }
  580.     ?>
  581.             <li><a href="#about">About - v<?php echo $v ?></a></li>
  582.             <li><a href="#help">Help</a></li>
  583.             <li><a href="#source">Source Code</a></li>
  584.         </ul>
  585.     </div>
  586.     <div id="help">
  587.     <div id="about">
  588.         <h2>About</h2>
  589.         <p>Tiny TYPO3 Test Suite v<?php echo $v ?> is a script that helps you test different method implementations. Get the latest version from github:
  590.             <a href="https://github.com/Tuurlijk/TinyTypo3TestSuite">https://github.com/Tuurlijk/TinyTypo3TestSuite</a></p>
  591.     </div>
  592.         <h2>Help</h2>
  593.         <h3>Execution Order</h3>
  594.         <p>In some cases, the second function (non baseline) always runs faster than the baseline. Even when switching the code around. This toggle enables you to reverse the running order to check for this behaviour. Your winning function should still win whatever the execution order. If that is not the case, then this test has failed to determine what code runs faster.</p>
  595.     </div>
  596.     <div id="source">
  597.         <h2>Source Code</h2>
  598.         <pre id="sourceCode"><a href="#source" id="showSourceLink">Show the sourcecode of this file.</a></pre>
  599.     </div>
  600.     <a href="#top" class="top" style="position: fixed; bottom: 10px; left: 25px; text-decoration: none;">^ top</a>
  601.     <a href="https://github.com/Tuurlijk/TinyTypo3TestSuite"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
  602.     <div id="logo" style="position: absolute; top: 60px; left: 60px;"><img alt="" src="data:image/png;base64,
  603. iVBORw0KGgoAAAANSUhEUgAAAHYAAAAiCAYAAACKuC3wAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
  604. bWFnZVJlYWR5ccllPAAABzJJREFUeNrsWwlsFUUYHh4VkEMEKaACHmAV0KTENFxaiIqK1sQDNYIS
  605. UTQRDSlH1DSIBqSgAQVijGIEjdYDREXEIEo4LSiKgFgUMKCAIK1KFQoUSv1++y/v7zCzZ1/bkP2T
  606. Lztv59jd+Wb+a/c1qKysVLGcftLAb8PKfNUQh8sYRxrkqUWGNpNweBhoI06XAiXALuBnoBBYgv77
  607. 4umvA2JBEtVlATcA13K5KVf3ADEbtPadcdju87rHgY+BURhnd0xDzUuagdAMHIYDg4HzDX3+1kll
  608. 6RjwuoOAnrje5Rjvn5iKFBGLCSYV+yxwu4eKtpFwIMT1aTHcCMyNqUgBsSB1NA75QGMffc6xnP89
  609. 1XY+Fv+SAKmP4DjNJ6kkzdGnwyns5Kn9OISxl3/FNKSAWODREP36Wc5/FWKsXTENqSG2W4h+11jO
  610. Lwo4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ABJRU5ErkJggg==" /></div>
  637. </div>
  638. </body>
  639. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement