I ran these codes in custom invocation and got weird running times.
#include<bits/stdc++.h>
using namespace std;
int main(){
//Hi
for(int i=0;i<5000000;i++)cout<<i<<" ";
return 0;
}
Run time: 2448 ms
#include<bits/stdc++.h>
using namespace std;
int main(){
for(int i=0;i<5000000;i++)cout<<i<<" ";
return 0;
}
Run time: 2901 ms
Can anyone explain why adding comment is having significant impact on running times?
PS: Changing comment affected run time slightly as well.