Open huyubiao opened 8 months ago
Is there a measurable difference in the performance tests if the global variables are in the .data section or the .bss section?
The latest gcc stable release is gcc 13.2 (https://gcc.gnu.org/releases.html)
Is there a measurable difference in the performance tests if the global variables are in the .data section or the .bss section?
The latest gcc stable release is gcc 13.2 (https://gcc.gnu.org/releases.html)
In GCC 10, the default option -fcommon is changed to -fno-common, see: PR85678. As a result, the uninitialized non-static global variables are moved from the COMMON block to the .bss. As a result, the performance tested in the same environment but different GCC versions is different. Can we initialize the global variable to eliminate this difference? (Global variables are also usually recommended to be initialized.)