Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Mac OS X 10.15.7
Desktop
2 years ago
length empty string
14.7M/s
length filled string
14.6M/s
length array of strings
14.6M/s
length empty array
14.6M/s
length empty array of objects
14.6M/s
isEmpty filled string
7.8M/s
custom isEmpty empty string
6.5M/s
custom isEmpty filled string
6.4M/s
isEmpty array of strings
6.4M/s
isEmpty array of objects
6.4M/s
isEmpty empty array
6.3M/s
isEmpty empty string
5.5M/s
custom isEmpty empty array
4.7M/s
custom isEmpty array of objects
4.0M/s
custom isEmpty array of strings
4.0M/s
View exact numbers
| Test name |
Executions per second |
|
✓
length empty string
|
14,692,755 Ops/sec |
|
length filled string
|
14,630,018 Ops/sec |
|
length array of strings
|
14,621,481 Ops/sec |
|
length empty array
|
14,565,225 Ops/sec |
|
length empty array of objects
|
14,556,654 Ops/sec |
|
isEmpty filled string
|
7,804,552 Ops/sec |
|
custom isEmpty empty string
|
6,470,420 Ops/sec |
|
custom isEmpty filled string
|
6,407,433 Ops/sec |
|
isEmpty array of strings
|
6,386,431 Ops/sec |
|
isEmpty array of objects
|
6,384,032 Ops/sec |
|
isEmpty empty array
|
6,339,162 Ops/sec |
|
isEmpty empty string
|
5,516,412 Ops/sec |
|
custom isEmpty empty array
|
4,724,324 Ops/sec |
|
custom isEmpty array of objects
|
3,965,915 Ops/sec |
|
custom isEmpty array of strings
|
3,962,430 Ops/sec |
Tests:
-
isEmpty empty array
-
length empty array
-
custom isEmpty empty array
-
isEmpty array of strings
-
length array of strings
-
custom isEmpty array of strings
-
isEmpty array of objects
-
length empty array of objects
-
custom isEmpty array of objects
-
isEmpty empty string
-
length empty string
-
custom isEmpty empty string
-
isEmpty filled string
-
length filled string
-
custom isEmpty filled string