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>
Benchmark.prototype.setup = function() {
  var fn = function() {};


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

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

Compare results of other browsers