Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
test if include in array
(version: 1)
test include
Comparing performance of:
case include vs case jquery
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.js'></script>
Script Preparation code:
var alreadyInitXEditableExpense = [,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 94, 96, 97,,,,,,,,,,,,,,, 108,,,,,,,,,,,,,,,,, 115];
Tests:
case include
if ( !alreadyInitXEditableExpense.includes(90) ) { console.log("not 90"); }
case jquery
if (!jQuery.inArray( "90", alreadyInitXEditableExpense) ) { console.log("not 90"); }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
case include
case jquery
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser/OS:
Chrome 131 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
case include
390601.0 Ops/sec
case jquery
18569610.0 Ops/sec
Related benchmarks:
Console.log
if !== or ===
if !== or === v2
More or equal
with if, without if
switch vs if - with match
console.log test
Length not 0
test if include in array 2
Comments
Confirm delete:
Do you really want to delete benchmark?