[GHC] #12629: Worse performance with -O1 or -O2 due to GC cost