Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Instanceof VS toString for date comparison when using objects
(version: 0)
Comparing performance of:
instanceof vs prototype.toString
Created:
one year ago
by:
Guest
Go to the latest result
Script Preparation code:
a = {};
Tests:
instanceof
a instanceof Date
prototype.toString
Object.prototype.toString.call(a) === '[object Date]'
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
instanceof
prototype.toString
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
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
Browser/OS:
Chrome 128 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
instanceof
10.5M/s
prototype.toString
10.0M/s
View exact numbers
Test name
Executions per second
✓
instanceof
10,513,417 Ops/sec
prototype.toString
9,957,124 Ops/sec
Related benchmarks
Instanceof VS toString for date comparison
Comments
Confirm delete:
Do you really want to delete benchmark?