Tests:

Historical Performance Data aggregated from 9 community runs

Desktop Results:
Chrome 9 runs
string equals empty string
172.1M/s
length is 0
171.2M/s
string soft equals empty string
167.2M/s
not length
166.1M/s
not string
165.7M/s
length soft equals 0
165.4M/s
not boolean
64.6M/s

Fastest: string equals empty string (2.7x faster)

View exact numbers
  • string equals empty string: 172,149,232 ops/sec
  • length is 0: 171,221,456 ops/sec
  • string soft equals empty string: 167,219,296 ops/sec
  • not length: 166,102,384 ops/sec
  • not string: 165,673,984 ops/sec
  • length soft equals 0: 165,447,920 ops/sec
  • not boolean: 64,592,512 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    not string
    length is 0
    not length
    string equals empty string
    string soft equals empty string
    not boolean
    length soft equals 0

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Linux
View result in a separate tab
not string
163.1M/s
length is 0
132.9M/s
length soft equals 0
132.3M/s
not length
131.8M/s
not boolean
128.3M/s
string soft equals empty string
124.8M/s
string equals empty string
119.9M/s
View exact numbers
Test name Executions per second
not string 163,104,832 Ops/sec
length is 0 132,934,680 Ops/sec
length soft equals 0 132,346,264 Ops/sec
not length 131,823,056 Ops/sec
not boolean 128,294,256 Ops/sec
string soft equals empty string 124,811,552 Ops/sec
string equals empty string 119,874,392 Ops/sec