mootools typeOf object check (v5)

Revision 5 of this benchmark created by Mark on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/mootools/1.3/mootools-yui-compressed.js"></script>

Setup

obj = 5;

Test runner

Ready to run.

Testing in
TestOps/sec
toType
a = ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
ready
mooTools
a = typeOf(obj);
ready
bare bones
a = ({}).toString.call(obj) === '[object Object]'
ready
typeof
a = typeof obj;
ready
object
a = Object.prototype.toString(obj) === '[object Object]'
ready

Revisions

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

  • Revision 1: published by Mark on
  • Revision 2: published by Mark on
  • Revision 3: published by Mark on
  • Revision 4: published by Mark on
  • Revision 5: published by Mark on