Comparing performance of: Boolean(0) vs !!0 vs Boolean(null) vs !!null vs Boolean(undefined) vs !!undefined vs Boolean(NaN) vs !!NaN vs Boolean('') vs !!''
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
Boolean(0)
!!0
Boolean(null)
!!null
Boolean(undefined)
!!undefined
Boolean(NaN)
!!NaN
Boolean('')
!!''
Fastest:N/A
Slowest:N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one to run it!