paint-brush
Micro Optimization: Don't Get Lost In The Rabbit Holeby@raphael.moutard
1,143 reads
1,143 reads

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

by Raphael14mJune 10th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

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)

People Mentioned

Mention Thumbnail
Mention Thumbnail

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Micro Optimization: Don't Get Lost In The Rabbit Hole
Raphael HackerNoon profile picture
Raphael

Raphael

@raphael.moutard

L O A D I N G
. . . comments & more!

About Author

Raphael HackerNoon profile picture
Raphael@raphael.moutard

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite