jQuery's isArray vs instanceof Array

Benchmark created on


Description

Is jQuery.isArray comparably fast to obj instanceof Array?

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
  function jq_array() {
   return jQuery.isArray([]);
  }
  
  function instof() {
   return ([] instanceof Array);
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery
jq_array();
ready
instanceof
instof();
ready

Revisions

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