Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lodash isplainobject vs native object check
(version: 1)
Comparing performance of:
lodash vs typeof
Created:
6 months ago
by:
Guest
Go to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var x = {'this': 'is', 'a': 'test', 'object': 52 }
Tests:
lodash
var y = _.isPlainObject(x)
typeof
var y = x !== null && typeof x === 'object' && (Object.getPrototypeOf(x) === Object.prototype || Object.getPrototypeOf(x) === null)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
lodash
typeof
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:147.0) Gecko/20100101 Firefox/147.0
Browser/OS:
Firefox 147 on Mac OS X 10.15
View result in a separate tab
Embed
Embed Benchmark Result
typeof
119.5M/s
lodash
11.7M/s
View exact numbers
Test name
Executions per second
✓
typeof
119,483,544 Ops/sec
lodash
11,663,549 Ops/sec
Related benchmarks
Lodash isPlainObject vs typeof
lodash isobject vs typeof
lodash isplainobject vs typeof object
lodash isobject vs typeof vs toString
Comments
Confirm delete:
Do you really want to delete benchmark?