logo
logo
Sign in

3 JavaScript Performance Mistakes You Should Stop Doing

avatar
Tech Mekrz
3 JavaScript Performance Mistakes You Should Stop Doing

What if I told you everything you knew was a lie, what will happen if you learn some of the key features our beloved ECMAScript have published over the recent years, are actually dangerous performance traps, sugar coated in a slick looking one line callback functional code?

This story starts a few years ago, back in the naive days of ES5…

I still remember this day vividly, ES5 was released, and great new array functions were introduced to our dear JavaScript.

To test these questions, I tried comparing a few scenarios and drilled down to understand the results I got.

I executed the following tests on Node.js v10.11.0 and in the Chrome browser, both on macOS.

The first scenario which came to mind was summing an array of 10k items, this is a valid real-life solution I stumbled upon while trying to fetch a long table of items from the database and enhance it with the total sum, without having an additional query to the DB.

collect
0
avatar
Tech Mekrz
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more