MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/30hyan/airbnb_javascript_style_guide_a_mostly_reasonable/cpt1f5a/?context=3
r/javascript • u/mrkipling • Mar 27 '15
158 comments sorted by
View all comments
1
Gotta ask a question and maybe this is my own stupidity. it talks about array slice over looping through an array to copy it, but when I look at the jsperf, it shows the while loop outperforming array slice. am I missing something?
2 u/[deleted] Mar 28 '15 Probably readability and code size, they probably aren't copying over tens of thousands of array items much.
2
Probably readability and code size, they probably aren't copying over tens of thousands of array items much.
1
u/milkeater Mar 27 '15
Gotta ask a question and maybe this is my own stupidity. it talks about array slice over looping through an array to copy it, but when I look at the jsperf, it shows the while loop outperforming array slice. am I missing something?