5 ms·
What code isn't running in some sort of "loop"? As I have discovered when, e.g., writing test build code, that function which "only runs once" actually gets run
by mechanical_fish 15y ago
What code isn't running in some sort of "loop"? As I have discovered when, e.g., writing test build code, that function which "only runs once" actually gets run several times per day, or several times per coder per day, or (when you are debugging or testing new code) several dozen times per hour.
Because every function is potentially callable from within someone else's loop, there is no such thing as a function that isn't part of a loop. There are merely frequent loops and less- frequent loops; it's a question of degree. Unless it's a function that really does never get run, in which case, yes, nobody cares if your dead code is slow.