Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
angular.isUndefined vs lodash isUndefined vs typeof === undefined fixed
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Browser:
Chrome 123
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
simplify native js
11.7M/s
Native js
6.4M/s
lodash.isUndefined
6.1M/s
angular.isUndefined
6.1M/s
View exact numbers
Test name
Executions per second
✓
simplify native js
11,673,843 Ops/sec
Native js
6,388,966 Ops/sec
lodash.isUndefined
6,127,059 Ops/sec
angular.isUndefined
6,061,408 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.2/angular.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.6.1/lodash.min.js"></script>
Script Preparation code:
var foo;
Tests:
angular.isUndefined
if (angular.isUndefined(foo)) { foo; }
lodash.isUndefined
if (_.isUndefined(foo)) { foo; }
Native js
if (foo === undefined) { foo; }
simplify native js
if (!foo) { foo; }