Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
isString vs
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/122.0.0.0 Safari/537.36
Browser:
Chrome 122
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
typeof
31.9M/s
object prototype
11.6M/s
View exact numbers
Test name
Executions per second
✓
typeof
31,891,918 Ops/sec
object prototype
11,638,947 Ops/sec
Script Preparation code:
var x = "123"
Tests:
object prototype
var y = Object.prototype.toString.call(x) === '[object String]'
typeof
var y = typeof x === "string"