Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
test .find and .reduce
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 OPR/106.0.0.0
Browser:
Opera 106
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
find
4798121.5 Ops/sec
reduce
70085288.0 Ops/sec
Tests:
find
const arrayLang = ['SRP','ENG', 'EST', 'RUS', 'POR', 'BRA', 'GER', 'QWE', 'ASD', 'TYU', 'ZXC', 'POI', 'HGT', 'QAS'] return arrayLang.reduce((acc, ObjectValue) => { if (ObjectValue?.language === 'ENG') { acc = ObjectValue; } return acc; }, undefined);
reduce
const arrayLang = ['SRP','ENG', 'EST', 'RUS', 'POR', 'BRA', 'GER', 'QWE', 'ASD', 'TYU', 'ZXC', 'POI', 'HGT', 'QAS'] return arrayLang.find((property) => property?.language === 'ENG');