Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d18429

Browse files
author
tobiasz.cudnik
committed
1 parent 1162021 commit 2d18429

File tree

158 files changed

+4352
-34947
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+4352
-34947
lines changed

SlickSpeed/run.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
include('../phpQuery/phpQuery.php');
3+
$selectors = array(
4+
'*','div div','div > div','div + div','div ~ div','div[class^=dia][class$=log]','body','body div','div','div div div','div, div, div','div, a, span','.dialog','div.dialog','div .dialog','div.character, div.dialog','#speech5','div#speech5','div #speech5','div.scene div.dialog','div#scene1 div.dialog div','#scene1 #speech1','div[%class]','div[%class=dialog]','div[%class^=dia]','div[%class$=log]','div[%class*=sce]','div[%class|=dialog]','div[%class!=madeup]','div[%class~=dialog]','div:only-child','div:contains(CELIA)','div:nth-child(even)','div:nth-child(2n)','div:nth-child(odd)','div:nth-child(2n+1)','div:nth-child(n)','div:last-child','div:first-child'
5+
);
6+
phpQuery('source_test.html');
7+
foreach($selectors as $query) {
8+
$query = str_replace('[%', '[', $query);
9+
$start = explode(' ', microtime());
10+
$result = phpQuery($query);
11+
$end = explode(' ', microtime());
12+
$time = ($end[1]-$start[1]) + ($end[0]-$start[0]);
13+
print "<p><strong>{$query}</strong>: {$time} | ".$result->length()." found</p>\n";
14+
flush();
15+
}
16+
?>

0 commit comments

Comments
 (0)