isEmpty vs isEmptyObject

Benchmark created by Adam Bankin on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="https://footage.shutterstock.com/public/libs/underscore/underscore-min.js">
</script>

Setup

var obj = {}

Test runner

Ready to run.

Testing in
TestOps/sec
$.isEmpty
!$.isEmptyObject(obj)
ready
_.isEmpty
!_.isEmpty(obj)
ready

Revisions

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