jquery.type with primitives

JavaScript performance comparison

Test case created by seb

Preparation code

<script src="https://gist.github.com/raw/4328726/bc4220d1ac928b41466da1eeb6ef52225a2b79b2/jquery.typeFast.js"></script>
      
<script>
Benchmark.prototype.setup = function() {
  var fn = function() {};

};
</script>

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
$.type with primitives
$.type( "foo" )
$.type( 1 )
$.type( true )
$.type( fn )
pending…
$.typeFast with primitives
$.typeFast( "foo" )
$.typeFast( 1 )
$.typeFast( true )
$.typeFast( fn )
pending…

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

Compare results of other browsers

0 Comments