If i make multiple null statements in c++, with no reason, does this affects in the execution time for the compiler? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

If i make multiple null statements in c++, with no reason, does this affects in the execution time for the compiler?

9th Aug 2017, 2:14 PM
Çůřîöş ßąšäñț 🇮🇳
Çůřîöş ßąšäñț 🇮🇳 - avatar
4 Answers
0
Even if the compiler don't get rid of it, it would make no difference in the computacional time of a program.
9th Aug 2017, 4:43 PM
Denis Felipe
Denis Felipe - avatar
+ 1
I mean..... void main() { ;;;;;;;;;;;;;;;;;;;......; }
9th Aug 2017, 3:13 PM
Çůřîöş ßąšäñț 🇮🇳
Çůřîöş ßąšäñț 🇮🇳 - avatar
0
someone has to interpret the coafter all so i think if yo would place like 1kkkkkkkkkkkkkkkkkkk... and some more of those it will slow interpreter a bit
9th Aug 2017, 3:16 PM
Paul
- 1
you mean like int a = null? why dont you try it out? if you want to initialize a null value, is place resetved for a variable? is there any place for a stack for that var? i think that yes, but may be wrong. if yes, then those 32 (default) bits are pointing to null so if you were about to inilialize like 1000 of them there would be 32000 empty bits, right? i may be wtong tho so i look forward for some answers!
9th Aug 2017, 2:55 PM
Paul