Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
array find vs _.find [1000 itens]
(version: 0)
Compare the new ES6 spread operator with the traditional concat() method
Comparing performance of:
array find vs _.find
Created:
7 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.core.js"></script>
Tests:
array find
var a = [3481,6653,5293,3506,7924,8051,1282,4744,3586,8531,1852,2352,3943,9402,2071,9673,9366,7702,5583,6060,4998,7711,9499,5240,8038,7459,6024,3421,4392,5556,7651,1256,9678,7958,8656,4236,2551,869,1409,2063,4813,6512,2385,6073,9203,8315,3274,5138,1648,4044,8211,2376,1304,9745,6953,2091,2010,6232,296,2504,617,8014,7083,660,8821,2858,128,8204,5078,4668,6978,8674,4022,2381,9790,8549,4556,399,286,6798,4700,2559,8727,8519,1813,1346,5857,9002,2538,7280,1603,4139,2222,5447,194,6596,6494,8226,4771,7331,3713,1019,4146,6730,929,5872,3638,5904,1951,7946,5514,2470,2285,496,350,1034,2229,1234,4718,7404,1679,3767,2699,5356,1418,5540,4169,2648,333,5728,1599,307,5655,2595,4121,502,9770,3626,3313,933,7581,7676,675,8761,4656,1698,2248,2046,6429,8213,1143,881,7819,5312,5985,2046,3636,3085,276,2744,9137,217,5644,1459,6632,2591,8352,5886,6662,3019,358,1657,6446,1662,8496,2046,3826,6744,5807,173,8737,8874,6227,6335,5404,1465,6497,5572,4142,6291,2205,6962,1903,347,9458,8655,8459,2553,2000,772,2448,5260,7678,5007,4810,1492,5206,2517,8463,5469,7931,4544,7907,1603,5915,89,6812,8865,63,8716,8,7506,1830,6169,2645,871,401,112,3254,3865,5783,4807,8382,3068,1411,9391,7452,5207,9154,2972,3763,9081,1755,2949,5799,1819,4526,6428,3874,6041,6658,9766,19,3052,512,3983,1591,8626,7900,1736,7641,5124,8947,9097,8022,5457,6823,4385,5076,9565,2553,8206,1348,8533,7850,8749,6258,5027,762,1808,3342,3,57,2808,6948,4950,7778,4384,6918,933,851,1371,384,2921,3021,9246,4341,8932,2149,7682,3093,1285,5216,4297,3747,3168,7015,846,2005,1636,5797,3939,5095,4136,845,6828,9329,8567,6370,5463,7046,9108,1171,2774,2222,7783,9406,3282,4807,4965,2273,164,5063,5529,8574,7233,6257,2332,3419,5288,9018,2112,4040,437,6831,8678,7089,2338,9191,751,4135,5048,3232,8444,5283,3767,2018,4282,1818,5559,6185,5676,5074,4906,5348,1616,1919,9114,2276,6419,9630,903,867,910,7834,5652,9680,1296,4195,6706,9852,7576,9161,9701,8486,8962,2944,5259,1650,1506,5501,9697,4630,6930,6340,8011,6581,1728,777,2092,5748,7390,9136,4654,8282,5867,3860,1811,710,4737,1460,8791,4126,4832,5959,7757,3719,3290,2194,1602,5515,5798,6498,5780,1556,8972,1483,3890,5613,1343,9950,6793,540,7933,7539,3808,3922,8501,4459,9438,7373,8036,6882,423,1972,7857,4591,5381,381,5932,5789,3329,8843,8701,8654,6975,6292,3503,5647,1251,6476,6359,4128,7651,8991,4849,2981,9342,9102,2966,6268,7305,4087,6276,2066,9278,9268,690,6254,8878,3545,2375,5335,4278,8262,7686,8313,7255,3360,9519,1683,2664,6444,3519,7266,7336,3930,8801,59,120,5560,6066,794,8016,7533,5293,8843,4630,6790,5160,8902,2104,8110,7561,1905,4178,9046,436,1421,1923,7283,7086,5641,7599,3895,1050,8806,3998,3080,8955,5915,7791,4930,1346,4287,4439,4467,8250,1164,7966,6755,3494,6264,9279,7341,2910,7995,4404,9910,664,5816,5460,242,4628,5450,9929,4425,9487,9738,9663,7474,8603,1187,9155,323,555,9378,8075,1263,9473,3518,6754,3237,5594,8250,9026,6476,4583,3876,381,6027,1887,9333,204,743,7753,7929,8214,651,8676,368,1638,3636,3168,2996,7582,6373,3483,3283,856,8817,5027,506,3287,9841,1223,8119,7309,8338,2335,999,7078,7789,5122,1420,4121,6597,4908,5746,5477,2942,1941,7392,3845,9891,1793,4125,5405,1519,9337,1178,6745,5406,9528,8299,427,9991,9421,890,766,2365,7136,1231,6935,6188,5771,419,153,2497,6843,5681,397,454,623,6985,7847,2891,8593,4642,2615,4477,2911,8907,7450,2523,6117,2269,3057,4581,9329,6541,7935,593,2236,4813,3877,4871,7539,543,1789,1836,837,8730,8672,1845,1077,6037,4682,5571,2795,8746,1614,856,2877,5547,1800,5064,6941,3967,9638,2887,144,6725,9943,4750,1720,3354,4109,4683,5107,5165,7572,2136,9654,7504,7438,6780,8111,3219,48,3682,9692,4218,74,7293,8219,3018,6822,3601,6756,7618,6193,1813,9803,4379,5662,8877,8230,8939,936,5006,8670,5173,5623,3465,2386,8647,8611,8025,7779,2464,7912,6747,2814,5408,6598,9517,1580,8597,9935,861,8758,8904,6502,2059,1320,3283,8148,4126,4467,7536,2043,2190,1497,5287,226,4149,6392,8456,4568,1851,4313,7705,249,4580,4379,7075,2534,3773,8558,3280,234,4501,1816,5246,5088,5876,1585,2252,7676,7341,5841,7269,8029,8246,4687,1068,9133,9757,1314,1431,406,8310,1710,9735,8062,7773,2977,8169,8962,2422,5952,1328,1672,8669,6886,8489,4288,7319,9462,9879,9935,4094,6718,1556,4704,3315,7833,2289,8519,7739,4309,194,4561,7554,651,3598,6177,2718,6589,7609,9209,1848,8265,4833,7959,920,9702,9522,8597,7097,5416,5992,2955,2825,5436,2092,6915,6473,3628,962,3444,2820,752,2934,4473,9305,4555,1760,3754,2089,9558,3420,6593,8856,7465,1291,1026,190,1808,9374,9951,7708,3949,246,9797,6798,3921,5666,5738,2919,9840,5455,9646,4434,2809,4949,40,5692,8950,6018,8875,245,2788,7903,7749,6114,6246,9704,156,3762,3494,1780,9958,3019,7705,3903,2807,4904,6294,3800,2573,4435,1180,3405,829,2815,1490,7940,7511,5294,4587,8676,531,8100,3339,7546,555,7203,8208,6357,6126,176,1814,3434,1402,4854,1482,2348,6398,5613,2427,8452,4929,3651,5999,9151,6070,6284,1902,1782,8716,8669,1259,6389,2318,5847,2085,2555,9963,2926,6615,906,2864,4915,3143,6100,3824,6208,5278,7078,9984,3789,6108,699,5104,1823,2435,4346,766]; var b = a.find(item => item === 766);
_.find
var a = [3481,6653,5293,3506,7924,8051,1282,4744,3586,8531,1852,2352,3943,9402,2071,9673,9366,7702,5583,6060,4998,7711,9499,5240,8038,7459,6024,3421,4392,5556,7651,1256,9678,7958,8656,4236,2551,869,1409,2063,4813,6512,2385,6073,9203,8315,3274,5138,1648,4044,8211,2376,1304,9745,6953,2091,2010,6232,296,2504,617,8014,7083,660,8821,2858,128,8204,5078,4668,6978,8674,4022,2381,9790,8549,4556,399,286,6798,4700,2559,8727,8519,1813,1346,5857,9002,2538,7280,1603,4139,2222,5447,194,6596,6494,8226,4771,7331,3713,1019,4146,6730,929,5872,3638,5904,1951,7946,5514,2470,2285,496,350,1034,2229,1234,4718,7404,1679,3767,2699,5356,1418,5540,4169,2648,333,5728,1599,307,5655,2595,4121,502,9770,3626,3313,933,7581,7676,675,8761,4656,1698,2248,2046,6429,8213,1143,881,7819,5312,5985,2046,3636,3085,276,2744,9137,217,5644,1459,6632,2591,8352,5886,6662,3019,358,1657,6446,1662,8496,2046,3826,6744,5807,173,8737,8874,6227,6335,5404,1465,6497,5572,4142,6291,2205,6962,1903,347,9458,8655,8459,2553,2000,772,2448,5260,7678,5007,4810,1492,5206,2517,8463,5469,7931,4544,7907,1603,5915,89,6812,8865,63,8716,8,7506,1830,6169,2645,871,401,112,3254,3865,5783,4807,8382,3068,1411,9391,7452,5207,9154,2972,3763,9081,1755,2949,5799,1819,4526,6428,3874,6041,6658,9766,19,3052,512,3983,1591,8626,7900,1736,7641,5124,8947,9097,8022,5457,6823,4385,5076,9565,2553,8206,1348,8533,7850,8749,6258,5027,762,1808,3342,3,57,2808,6948,4950,7778,4384,6918,933,851,1371,384,2921,3021,9246,4341,8932,2149,7682,3093,1285,5216,4297,3747,3168,7015,846,2005,1636,5797,3939,5095,4136,845,6828,9329,8567,6370,5463,7046,9108,1171,2774,2222,7783,9406,3282,4807,4965,2273,164,5063,5529,8574,7233,6257,2332,3419,5288,9018,2112,4040,437,6831,8678,7089,2338,9191,751,4135,5048,3232,8444,5283,3767,2018,4282,1818,5559,6185,5676,5074,4906,5348,1616,1919,9114,2276,6419,9630,903,867,910,7834,5652,9680,1296,4195,6706,9852,7576,9161,9701,8486,8962,2944,5259,1650,1506,5501,9697,4630,6930,6340,8011,6581,1728,777,2092,5748,7390,9136,4654,8282,5867,3860,1811,710,4737,1460,8791,4126,4832,5959,7757,3719,3290,2194,1602,5515,5798,6498,5780,1556,8972,1483,3890,5613,1343,9950,6793,540,7933,7539,3808,3922,8501,4459,9438,7373,8036,6882,423,1972,7857,4591,5381,381,5932,5789,3329,8843,8701,8654,6975,6292,3503,5647,1251,6476,6359,4128,7651,8991,4849,2981,9342,9102,2966,6268,7305,4087,6276,2066,9278,9268,690,6254,8878,3545,2375,5335,4278,8262,7686,8313,7255,3360,9519,1683,2664,6444,3519,7266,7336,3930,8801,59,120,5560,6066,794,8016,7533,5293,8843,4630,6790,5160,8902,2104,8110,7561,1905,4178,9046,436,1421,1923,7283,7086,5641,7599,3895,1050,8806,3998,3080,8955,5915,7791,4930,1346,4287,4439,4467,8250,1164,7966,6755,3494,6264,9279,7341,2910,7995,4404,9910,664,5816,5460,242,4628,5450,9929,4425,9487,9738,9663,7474,8603,1187,9155,323,555,9378,8075,1263,9473,3518,6754,3237,5594,8250,9026,6476,4583,3876,381,6027,1887,9333,204,743,7753,7929,8214,651,8676,368,1638,3636,3168,2996,7582,6373,3483,3283,856,8817,5027,506,3287,9841,1223,8119,7309,8338,2335,999,7078,7789,5122,1420,4121,6597,4908,5746,5477,2942,1941,7392,3845,9891,1793,4125,5405,1519,9337,1178,6745,5406,9528,8299,427,9991,9421,890,766,2365,7136,1231,6935,6188,5771,419,153,2497,6843,5681,397,454,623,6985,7847,2891,8593,4642,2615,4477,2911,8907,7450,2523,6117,2269,3057,4581,9329,6541,7935,593,2236,4813,3877,4871,7539,543,1789,1836,837,8730,8672,1845,1077,6037,4682,5571,2795,8746,1614,856,2877,5547,1800,5064,6941,3967,9638,2887,144,6725,9943,4750,1720,3354,4109,4683,5107,5165,7572,2136,9654,7504,7438,6780,8111,3219,48,3682,9692,4218,74,7293,8219,3018,6822,3601,6756,7618,6193,1813,9803,4379,5662,8877,8230,8939,936,5006,8670,5173,5623,3465,2386,8647,8611,8025,7779,2464,7912,6747,2814,5408,6598,9517,1580,8597,9935,861,8758,8904,6502,2059,1320,3283,8148,4126,4467,7536,2043,2190,1497,5287,226,4149,6392,8456,4568,1851,4313,7705,249,4580,4379,7075,2534,3773,8558,3280,234,4501,1816,5246,5088,5876,1585,2252,7676,7341,5841,7269,8029,8246,4687,1068,9133,9757,1314,1431,406,8310,1710,9735,8062,7773,2977,8169,8962,2422,5952,1328,1672,8669,6886,8489,4288,7319,9462,9879,9935,4094,6718,1556,4704,3315,7833,2289,8519,7739,4309,194,4561,7554,651,3598,6177,2718,6589,7609,9209,1848,8265,4833,7959,920,9702,9522,8597,7097,5416,5992,2955,2825,5436,2092,6915,6473,3628,962,3444,2820,752,2934,4473,9305,4555,1760,3754,2089,9558,3420,6593,8856,7465,1291,1026,190,1808,9374,9951,7708,3949,246,9797,6798,3921,5666,5738,2919,9840,5455,9646,4434,2809,4949,40,5692,8950,6018,8875,245,2788,7903,7749,6114,6246,9704,156,3762,3494,1780,9958,3019,7705,3903,2807,4904,6294,3800,2573,4435,1180,3405,829,2815,1490,7940,7511,5294,4587,8676,531,8100,3339,7546,555,7203,8208,6357,6126,176,1814,3434,1402,4854,1482,2348,6398,5613,2427,8452,4929,3651,5999,9151,6070,6284,1902,1782,8716,8669,1259,6389,2318,5847,2085,2555,9963,2926,6615,906,2864,4915,3143,6100,3824,6208,5278,7078,9984,3789,6108,699,5104,1823,2435,4346,766]; var b = _.find(a, item => item === 766);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
array find
_.find
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!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
I'll do my best to answer the question. The _.find() function is being used to find an element in the array 'a' that matches the condition specified in the callback function. In this case, the callback function is checking if each item is equal to 766. The first result shows the execution of the test on a Chrome browser with version 67, taking around 846k executions per second. The second result shows an error message from the browser, indicating that there's no item in the array 'a' equal to 766.
Related benchmarks:
native find vs lodash _.find..
array find vs some vs lodash
native find vs lodash _.find_fork
Compare prototype.find vs lodash/find
Comments
Confirm delete:
Do you really want to delete benchmark?