Skip to content
This repository has been archived by the owner on Dec 21, 2019. It is now read-only.

Show increased values #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ <h1><span>SlickSpeed</span></h1>
<h2>Speed/validity selectors test for frameworks.</h2>
<p>Every framework runs in his own iFrame, thus no conflicts can happen. Tests are run selector by selector, with an interval to prevent the browser from freeezing.</p>
<p>Tests are run in a neutral environment, no library or framework is included in the main javascript test.</p>
<p>Times displayed are the sum of each test run 20 times.</p>
<p>Under firefox, disable firebug for more accurate results, as most frameworks could throw warnings, slowing down the dom query process.</p>

<p>Tests are run against a local copy of <a href="template.html">this document</a>.</p>
29 changes: 21 additions & 8 deletions system/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,31 @@
function test(selector){
try {
var start = new Date().getTime();
var i = 1;
var elements = <?php echo $_GET['function']; ?>(selector);
i ++; <?php echo $_GET['function']; ?>(selector);
i ++; <?php echo $_GET['function']; ?>(selector);
i ++; <?php echo $_GET['function']; ?>(selector);
i ++; <?php echo $_GET['function']; ?>(selector);
i ++; <?php echo $_GET['function']; ?>(selector);
var end = ((new Date().getTime() - start) / i);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
<?php echo $_GET['function']; ?>(selector);
var end = (new Date().getTime() - start);
return {'time': Math.round(end), 'found': get_length(elements)};
} catch(err){
if (elements == undefined) elements = {length: -1};
return ({'time': (new Date().getTime() - start) / i, 'found': get_length(elements), 'error': err});
return ({'time': (new Date().getTime() - start), 'found': get_length(elements), 'error': err});
}

};
Expand Down