Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
typeof vs truthyness benchmark
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Browser:
Chrome 150
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
24 days ago
typeof string
16.8M/s
truthyness
16.8M/s
View exact numbers
Test name
Executions per second
✓
typeof string
16,831,558 Ops/sec
truthyness
16,810,086 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const test = "some-string"; let c = 0;
Tests:
typeof string
if (typeof test === 'string') { c++; }
truthyness
if (test) { c++; }