Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0
Firefox 128
Mac OS X 10.15
Desktop
one year ago
length empty array
8.2M/s
length empty array of objects
8.1M/s
length array of strings
7.9M/s
length filled string
7.8M/s
length empty string
7.4M/s
isEmpty empty string
6.6M/s
isEmpty filled string
6.6M/s
custom isEmpty empty array
5.9M/s
custom isEmpty array of objects
5.8M/s
isEmpty empty array
5.3M/s
isEmpty array of objects
5.1M/s
isEmpty array of strings
5.1M/s
custom isEmpty empty string
4.9M/s
custom isEmpty filled string
4.8M/s
custom isEmpty array of strings
3.5M/s
View exact numbers
| Test name |
Executions per second |
|
✓
length empty array
|
8,182,340 Ops/sec |
|
length empty array of objects
|
8,114,858 Ops/sec |
|
length array of strings
|
7,927,616 Ops/sec |
|
length filled string
|
7,843,720 Ops/sec |
|
length empty string
|
7,444,999 Ops/sec |
|
isEmpty empty string
|
6,596,802 Ops/sec |
|
isEmpty filled string
|
6,573,740 Ops/sec |
|
custom isEmpty empty array
|
5,928,102 Ops/sec |
|
custom isEmpty array of objects
|
5,826,167 Ops/sec |
|
isEmpty empty array
|
5,347,750 Ops/sec |
|
isEmpty array of objects
|
5,137,556 Ops/sec |
|
isEmpty array of strings
|
5,099,799 Ops/sec |
|
custom isEmpty empty string
|
4,922,654 Ops/sec |
|
custom isEmpty filled string
|
4,771,350 Ops/sec |
|
custom isEmpty array of strings
|
3,537,372 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