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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
truthyness
9.7M/s
typeof string
9.7M/s
View exact numbers
Test name
Executions per second
✓
truthyness
9,745,809 Ops/sec
typeof string
9,740,197 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++; }