https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88533
--- Comment #4 from Harald Anlauf <anlauf at gmx dot de> --- Without CONTIGUOUS, I see -O3 brings gcc-9 to the level of gcc-7 or gcc-8: baseline + -O3 -funroll-loops -fcheck=bounds : 7: 1.57 8: 1.40 9: 1.57 baseline + -O3 -funroll-loops -fcheck=bounds -fno-tree-ch : 7: 1.76 8: 1.55 9: 1.54 So there's something between -O2 and -O3 that helps sometimes.