Micro Optimization: Don't Get Lost In The Rabbit Hole

Written by raphael.moutard | Published 2020/06/10
Tech Story Tags: javascript | optimization | time-complexity | programming | hackernoon-top-story | code-quality | development | management | web-monetization

TLDR An engineer of his team wrote a one-liner to check if the value was valid, using the following code: VALID_VALUES. Another one suggested a ‘performance improvement’ using instead: Valid_value1, 'valid_value2' The author of the PR started to argue that it was not an improvement as the time to create the Set from an array is O(N) This is called micro-optimisations, and they don’t make any difference in web development (not true for video games)via the TL;DR App

no story

Published by HackerNoon on 2020/06/10