Comment O(n) + O(n) = O(n) (Score 1) 168
Big-O is useful mainly when you're talking about how the execution time will grow relative to the size of the problem. True, O(n) + O(n) won't grow any faster than O(n), but it is still twice as long.
"Horrendously bad" is of course relative, and can only be determined after profiling your application. In some cases it won't make a squat of a difference, but in others it could have a significant impact.
"Horrendously bad" is of course relative, and can only be determined after profiling your application. In some cases it won't make a squat of a difference, but in others it could have a significant impact.