Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
!! (number)
189.3M/s
ternary (number)
181.3M/s
!! (string)
179.8M/s
ternary (string)
179.2M/s
Boolean() (string)
16.5M/s
Boolean() (number)
16.4M/s

Fastest: !! (number) (11.6x faster)

View exact numbers
  • !! (number): 189,288,528 ops/sec
  • ternary (number): 181,303,104 ops/sec
  • !! (string): 179,778,224 ops/sec
  • ternary (string): 179,205,808 ops/sec
  • Boolean() (string): 16,501,763 ops/sec
  • Boolean() (number): 16,360,890 ops/sec

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

Browser OS Engine User Agent When Created
Chrome 131 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 one year ago
Chrome 130 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 one year ago
Chrome 128 Mac OS X 10.15.7 Benchmark.js 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 one year ago
Chrome 123 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 2 years ago
Firefox 124 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0 2 years ago
Chrome 122 Mac OS X 10.15.7 Benchmark.js Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 2 years ago
Safari 17 Mac OS X 10.15.7 Benchmark.js Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Safari/605.1.15 2 years ago