Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Mac OS X 10.15.7
Desktop
one year ago
length empty string
13.0M/s
length filled string
13.0M/s
length array of strings
12.9M/s
length empty array of objects
12.9M/s
length empty array
12.8M/s
isEmpty empty string
7.0M/s
isEmpty filled string
7.0M/s
isEmpty array of strings
5.9M/s
custom isEmpty empty string
5.8M/s
isEmpty array of objects
5.8M/s
isEmpty empty array
5.8M/s
custom isEmpty filled string
5.7M/s
custom isEmpty empty array
4.3M/s
custom isEmpty array of objects
3.7M/s
custom isEmpty array of strings
3.6M/s
View exact numbers
| Test name |
Executions per second |
|
✓
length empty string
|
13,014,347 Ops/sec |
|
length filled string
|
12,951,113 Ops/sec |
|
length array of strings
|
12,942,596 Ops/sec |
|
length empty array of objects
|
12,926,015 Ops/sec |
|
length empty array
|
12,807,301 Ops/sec |
|
isEmpty empty string
|
7,034,078 Ops/sec |
|
isEmpty filled string
|
7,011,779 Ops/sec |
|
isEmpty array of strings
|
5,860,886 Ops/sec |
|
custom isEmpty empty string
|
5,848,944 Ops/sec |
|
isEmpty array of objects
|
5,778,838 Ops/sec |
|
isEmpty empty array
|
5,771,096 Ops/sec |
|
custom isEmpty filled string
|
5,724,816 Ops/sec |
|
custom isEmpty empty array
|
4,328,196 Ops/sec |
|
custom isEmpty array of objects
|
3,725,741 Ops/sec |
|
custom isEmpty array of strings
|
3,597,738 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