Conjuction vs Disjunction

JavaScript performance comparison

Test case created by Zbyněk Eiselt

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Includes
var s1 = "chrome-extension://hgpnjgdgbgclnpljbiialmfhbnapeppb";
var s2 = "hgpnjgdgbgclnpljbiialmfhbnapeppb";

s1.includes(s2);
pending…
Search
var s1 = "chrome-extension://hgpnjgdgbgclnpljbiialmfhbnapeppb";
var s2 = "hgpnjgdgbgclnpljbiialmfhbnapeppb";

s1.search(s2);
pending…
RegExp
var s1 = "chrome-extension://hgpnjgdgbgclnpljbiialmfhbnapeppb";
var s2 = "hgpnjgdgbgclnpljbiialmfhbnapeppb";

var tt = new RegExp(s1, "g");
tt.test(s1);
pending…
Plus
var s1 = "chrome-extension://hgpnjgdgbgclnpljbiialmfhbnapeppb";
var s2 = "hgpnjgdgbgclnpljbiialmfhbnapeppb";

s2 = "chrome-extension://"+s2;
s1 == s2
pending…
Minus
var s1 = "chrome-extension://hgpnjgdgbgclnpljbiialmfhbnapeppb";
var s2 = "hgpnjgdgbgclnpljbiialmfhbnapeppb";

s1 = s1.substring(19);
s1 == s2
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

0 Comments