Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Small includes vs has
(version: 0)
Comparing performance of:
has true vs includes true vs has false vs includes false
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var a = [ 'height', 'width', 'maxHeight', 'maxWidth', ]; var b = new Set(a)
Tests:
has true
const bb = b; for (let i = 0; i < 1000; i++) { bb.has('maxWidth') }
includes true
const aa = a; for (let i = 0; i < 1000; i++) { aa.includes('maxWidth') }
has false
const bb = b; for (let i = 0; i < 1000; i++) { bb.has('maxWidth3') }
includes false
const aa = a; for (let i = 0; i < 1000; i++) { aa.includes('maxWidth3') }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
has true
includes true
has false
includes false
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!
Comments
Confirm delete:
Do you really want to delete benchmark?