+ 2
Does lenght of code in C++ affect on speed of executing program?
3 Réponses
+ 3
No. The complexity determines how fast a program runs. Actually good timing for your questions, because I just made a comparison of 2 algorithms which get the same data and produce the same result, but have different complexities.
https://code.sololearn.com/c9Zw3SPns8Ta/?ref=app
+ 2
It can, code is stored stored via icache, which has to be fetched and is of limited capacity, the longer the code the more likely you will get icache misses, especially with unpredictable branches.
+ 1
Thanks for the answer. That's what I've been looking for. Thumbs up!