html wrapper methods

JavaScript performance comparison

Revision 2 of this test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var s = "this is the to-be-wrapped text";
    var s_link = "http://google.com/"
    var out = null
   
    function nonnative_link(text, link) {
        return "<a href=\"" + link + "\">" + text + "</a>"
    }
   
    function nonnative_blink(text) {
        return "<blink>" + text + "</blink>"
    }
};
</script>

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
native html wrapper
out = s.link(s_link)
pending…
string concatenation
out = nonnative_link(s, s_link)
pending…
native blink()
out = s.blink()
pending…
string concat blink()
out = nonnative_blink(s)
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