When I try to compile C++ code like this, it takes me 71s:
#include<bits/stdc++.h>
struct S{int v=1;}a[1<<25];
int main(){
return 0;
}
However, when I change the 1 to 0, it compiles in just 1s:
#include<bits/stdc++.h>
struct S{int v=0;}a[1<<25];
int main(){
return 0;
}
I know I can use something like S(){v=1;}, but I just want to know about this interesting difference.
System: MacOS 12.4
Compiler: g++-11 (Homebrew GCC 11.3.0_2) 11.3.0