Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Consider signing in before you create benchmark.3
(version: 0)
Comparing performance of:
1 vs 2
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var a = [ 5592662, 8882310, 12303546, 3618871, 11053224, 7631988, 11164986, 4879411, 5274935, 5934134, 6000703, 214525, 15527148, 7159078, 7947049, 5719076, 2769693, 10114101, 10705205, 16382457, 5143094, 1579286, 1120523, 6132288, 3560742, 3230754, 9131316, 276686, 5670971, 2566182, 9720627, 4945196, 14869729, 8800557, 3890472, 5585954, 5934654, 279274, 4549679, 406186, 214003, 4417838, 5341240, 2758927, 4022314, 16119542, 11362106, 5538609, 1131946, 6506280, 6579300, 791304, 9146761, 16579836, 16777215, 5868605, 3692839, 1780242, 5604666, 5802556, 4285485, 2439961, 13948116, 403580, 9194800, 8226169, 1318670, 4597272, 10836792, 13487565, 131842, 14672095, 148730, 5934142, 9605778, 5989718, 5868341, 4731677, 5066061, 4473924, 3678741, 2110230, 11230006, 10246454, 10639672, 10266007, 5976863, 15132902, 201014, 607452, 10573108, 10131866, 7237230, 15856114, 5933630, 2897451, 6131767, 5803070, 789514, 82681, 202570, 2827282, 1266650, 82940, 1582352, 14343131, 1320492, 3428900, 2967328, 1978388, 9784627, 5934396, 1576456, 527621, 12962754, 15658990, 1658270, 7042407, 8345907, 12700094, 5385501, 329731, 5802558, 5670715, 14014931, 10902585, 3752755, 10594973, 13291463, 5999926, 9330487, 4871748, 133402, 3691813, 9656374, 5999168, 2307608, 1655159, 6517086, 12239798, 8687486, 2637596, 3357742, 1516049, 664144, 8933681, 11558458, 10246200, 16251381, 3099423, 4681776, 12764098, 4219686, 2308120, 5408057, 214522, 6329913, 3496230, 935619, 138859, 10592417, 6974313, 9410186, 10574904, 5075512, 4483624, 609006, 5868857, 10770233, 3297059, 6065983, 3494179, 872422, 5934653, 15856623, 1922482, 5397325, 9458225, 2039838, 5472825, 5867827, 10965814, 3362852, 8277551, 10377014, 6515551, 5274671, 280316, 5868088, 3560736, 15922418, 529444, 5606972, 3812889, 1661391, 5736764, 2108442, 15987699, 4279100, 5734974, 4803656, 5803838, 3100449, 3167265, 11515820, 3626791, 985093, 1187595, 5076789, 3494687, 66572, 5933375, 5802047, 5736244, 3559719, 4079166, 264202, 16579580, 16645629, 16250871, 16316664, 16711422, 16448507, 9870737, 11579568, 5014326, 6198336, 3092272, 5801276, 1052688, 15462376, 7235952, 9854776, 7294253, 8487041, 460551, 3364132, 16316408, 7699569, 2637591, 6184799, 412154, 6842472, 346101, 16053492, 11163960, 13290441, 14278614, 16579835, 9803157, 10068119, 2315929, 9342606, 5934398, 0, 0 ]; var b = new Set(a);
Tests:
1
const d = Array.from(b);
2
const c = [...b];
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
1
2
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/127.0.0.0 Safari/537.36
Browser/OS:
Chrome 127 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
1
1221381.0 Ops/sec
2
1498831.8 Ops/sec
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
Based on the provided input, I will attempt to answer the question. It appears that we have two benchmarking results for converting a `Set` object to an array using different methods: `Array.from()` and spread syntax (`...`). We are also given a raw UA string indicating the browser version and device platform. To answer the question, I notice that the `Test Name` values in both benchmarking results are "1" and "2", which correspond to the two conversion methods. The first result is from Chrome 127 on Windows, with an execution rate of 1221381 executions per second. The second result is also from Chrome 127 on Windows, but this time it has a higher execution rate of 1498831 executions per second. Based on these results, it seems that the spread syntax (`...`) might be slightly faster than `Array.from()`. However, I must emphasize that this is a highly specific and potentially edge-case comparison, as the difference in performance is relatively small (approximately 22% increase in execution rate). Therefore, I will provide an answer with some caveats: The spread syntax (`...`) appears to be slightly faster than `Array.from()` for converting a `Set` object to an array. However, the difference in performance is relatively small, and other factors such as browser version, device platform, and test environment may influence the actual performance of these methods. Please note that this answer is based on the provided benchmarking results and should be taken with caution.
Related benchmarks:
uniq vs Set large
Consider signing in before you create benchmark.
Consider signing in before you create benchmark.322
Consider signing in before you create benchmark.3221
Comments
Confirm delete:
Do you really want to delete benchmark?