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:
3 months ago
by:
Guest
Jump 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:
3 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
Test name
Executions per second
lodash
11663549.0 Ops/sec
typeof
119483544.0 Ops/sec
Related benchmarks:
isEmpty vs Object.keys
Lodash isPlainObject vs typeof
Comparing of native .length and Lodash _.isEmpty
Comparing perf of native .length and Lodash _.isEmpty
Comparing performance of native .length and Lodash _.isEmpty v2
lodash isobject vs typeof
lodash isPlainobject vs valina JS
lodash isplainobject vs typeof object
lodash isobject vs typeof vs toString
Comments
Confirm delete:
Do you really want to delete benchmark?