Open in app
omrilotan
43 Followers
About

Sign in

43 Followers
About
Open in app
Rethinking JavaScript: Death of the For Loop
2.5K
56

Joel Thoms

omrilotan

omrilotan

Jul 1, 2017·1 min read

When you’re replacing one for loop for two iterator functions, filter and map , you’ve sacrificed performance for style. In performance centric programs I’d think it’s a bad call. Here’s a benchmark of both of your examples:

Written by

omrilotan

omrilotan.com

  • Javascript Performance

More from omrilotan

omrilotan.com

More From Medium

JavaScript — Iterate Over Object Properties

Ron Yosef in The Startup

I Was Crushed When I Discovered I Was His “Third Tier” Girl

Elle Silver in The Virago

The GameStop Fiasco Proves We’re in a ‘Meme Stock’ Bubble

James Surowiecki in Marker

The 5 Habits That Will Help You Burn Fat Efficiently

Alyssa Atkinson in In Fitness And In Health

Working From Home Setup 3.0

Paul Alvarez in Techuisite

Generating Passive Income Is Hard, Here Is a Better Option

Ben Le Fort in Making of a Millionaire

10 Unforgivable Phrases Developers Should Stop Saying at Interviews

Isabel Nyo in Better Programming

You don’t behave this way when you love someone

E.B. Johnson, NLP-MP in LV Development

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store