Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
lodash isobject vs typeof vs toString
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/122.0.6261.62 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 122
Operating system:
iOS 16.6
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
lodash
11487659.0 Ops/sec
typeof
26687140.0 Ops/sec
toString
4164956.8 Ops/sec
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 = _.isObject(x)
typeof
var y = (typeof(x) === 'object')
toString
var y = toString.call(x) === "[object Object]";