Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
text compare array, indexof and function(some, array)3
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Browser:
Chrome 120
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
if indexof
0.0 Ops/sec
function some array
12448533.0 Ops/sec
Script Preparation code:
containerTXTfilt = "Hunter made a surprise appearance on Capitol Hill Wednesday as Republicans work to hold him in contempt of Congress. The House Oversight and Judiciary Committee will vote Wednesday on a contempt resolution that could aid Republicans in pushing to impeach President Joe Biden.If the resolution passes, it will go to the House for a vote before being handed over to the Department of Justice to prosecute.READ MORE | House Republicans probing whether Biden was involved in sons subpoena defiance: Impeachable offenseThe presidents son intentionally defied a congressional subpoena in December, instead giving a press conference in which he decried those investigating President Bidens alleged connection to his business deals.For six years, I have been the target of the unrelenting Trump attack machine shouting Wheres Hunter Well, here is my answer, I am here, he told reporters.Comment bubbleJOIN THE CONVERSATION" textArray = ["자댕이", "보댕이", "좃물", "보짓물", "좆뱀", "실잦", "자적자", "실좆", "갈좆", "좆빨", "보적보", "걸레", "보징어", "보릉", "갈보", "보빨", "허벌", "흉자", "소추", "자들자들", "피싸", "6.9"]; isTextContained = textArray.some(function (text) { return containerTXTfilt.includes(text); });
Tests:
if indexof
if (~containerTXTfilt.indexOf('자댕이') || ~containerTXTfilt.indexOf('보댕이') || ~containerTXTfilt.indexOf('좃물') || ~containerTXTfilt.indexOf('보짓물') || ~containerTXTfilt.indexOf('좆뱀') || ~containerTXTfilt.indexOf('실잦') || ~containerTXTfilt.indexOf('자적자') || ~containerTXTfilt.indexOf('실좆') || ~containerTXTfilt.indexOf('갈좆') || ~containerTXTfilt.indexOf('좆빨') || ~containerTXTfilt.indexOf('보적보') || ~containerTXTfilt.indexOf('걸레') || ~containerTXTfilt.indexOf('보징어') || ~containerTXTfilt.indexOf('보릉') || ~containerTXTfilt.indexOf('갈보') || ~containerTXTfilt.indexOf('보빨') || ~containerTXTfilt.indexOf('허벌') || ~containerTXTfilt.indexOf('흉자') || ~containerTXTfilt.indexOf('소추') || ~containerTXTfilt.indexOf('자들자들') || ~containerTXTfilt.indexOf('피싸') || ~containerTXTfilt.indexOf('6.9')) { console.log('확인'); }
function some array
if (isTextContained) { console.log("명령 실행");}
if includes
if (containerTXTfilt.includes('자댕이') || containerTXTfilt.includes('보댕이') || containerTXTfilt.includes('좃물') || containerTXTfilt.includes('보짓물') || containerTXTfilt.includes('좆뱀') || containerTXTfilt.includes('실잦') || containerTXTfilt.includes('자적자') || containerTXTfilt.includes('실좆') || containerTXTfilt.includes('갈좆') || containerTXTfilt.includes('좆빨') || containerTXTfilt.includes('보적보') || containerTXTfilt.includes('걸레') || containerTXTfilt.includes('보징어') || containerTXTfilt.includes('보릉') || containerTXTfilt.includes('갈보') || containerTXTfilt.includes('보빨') || containerTXTfilt.includes('허벌') || containerTXTfilt.includes('흉자') || containerTXTfilt.includes('소추') || containerTXTfilt.includes('자들자들') || containerTXTfilt.includes('피싸') || containerTXTfilt.includes('6.9')) { console.log('확인'); }