paint-brush
Neat optimization trick: reduce the number of jumps in a nested loopby@stag1e
14,410 reads
14,410 reads

Neat optimization trick: reduce the number of jumps in a nested loop

by Giedrius Statkevičius3mMarch 6th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

By reordering nested loops you can easily achieve more efficient code, that is, with less code jumps. Credit for the original idea goes to “Code Complete” which was written by Steve McConnell but I am going to expand it a bit further with math…
featured image - Neat optimization trick: reduce the number of jumps in a nested loop
Giedrius Statkevičius HackerNoon profile picture
Giedrius Statkevičius

Giedrius Statkevičius

@stag1e

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

About Author

Giedrius Statkevičius HackerNoon profile picture
Giedrius Statkevičius@stag1e

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