compiler會optimized吧
所有跟帖:
• 不会,如果在竞赛中 -兄贵- ♂ (240 bytes) () 08/31/2022 postreply 12:52:27
• 现在的compile应该会。s是local变量,而且在loop里没变化。 -ccb168- ♂ (0 bytes) () 08/31/2022 postreply 13:05:00
• 什么编译器? 贴一下您的测试结果,好吗 -兄贵- ♂ (0 bytes) () 08/31/2022 postreply 13:41:26
• try -O2 with gcc -ccb168- ♂ (0 bytes) () 08/31/2022 postreply 15:10:00
• 应该不会优化,这是memory access,完全可能有别的在改memory -avw- ♀ (0 bytes) () 08/31/2022 postreply 13:19:31