Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
indexOf VS includes in JavaScript Array
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/130.0.0.0 Safari/537.36
Browser:
Chrome 130
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
indexOf
5096661.5 Ops/sec
includes
5081301.0 Ops/sec
Script Preparation code:
var array = [4457, 6563, 30851, 40303, 42053, 47405, 52810, 90772, 96252, 125488, 151673, 158557, 178050, 195190, 203029, 210539, 216541, 242156, 262560, 275861, 284045, 285385, 286899, 307581, 337018, 340978, 353359, 365569, 398211, 398284, 424423, 425550, 427665, 429594, 440844, 445754, 452877, 491428, 494809, 501187, 513180, 518540, 520189, 527068, 532607, 537414, 541551, 543608, 544796, 548722, 564979, 569266, 586233, 589433, 604742, 628230, 649872, 651744, 657815, 663902, 669333, 676214, 684405, 705674, 706487, 709528, 728070, 728490, 729012, 741404, 742443, 750860, 760686, 783419, 791554, 797225, 799311, 813491, 816277, 822413, 844859, 865342, 869820, 871814, 873451, 873918, 879036, 882069, 902231, 918049, 918788, 920500, 930129, 932809, 943528, 943818, 964607, 974967, 995708, 999756];
Tests:
indexOf
array.indexOf(151673);
includes
array.includes(151673);