JS Challenge 2

JavaScript performance comparison

Test case created by Michael

Info

The second code challenge @ DM

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Michael K
function scrambler() {
    var match = 0
    var fail = 0;
    var clone = "this is my test string";
    var cloneLow = clone.toLowerCase();
    var cloneArr = cloneLow.split("");
    var orig = "i miss test";
    var origLow = orig.toLowerCase();
    var origArr = origLow.split("");
    for(var i = 0; i < clone.length; i++) {
        if (orig.indexOf(clone[i]) == -1) {
            fail++;
        } else {
            match++;
        }
    }
    if (match >= origArr.length) {
        return true;
    } else {
        return false;
    }
}
pending…
holder
test
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment