Don’t pretend optinfo^.index can be aword(−1).
I tried to redo the unapplied part of !141 (closed), and while I didn’t get anything interesting, I also noticed that:
-
No one ever sets
toptinfo.index
toaword(-1)
, the comment and the check are misleading. (And I think doing it has no obvious benefits over continuing not to do it?) -
Early exit in
optdfa.TDFABuilder.CreateLifeInfo.CreateInfo.updatelifeinfo
saves some dynamic array assignments. For example, when compiling the x86-64 compiler itself, it saves 270,000 assignments, speeding up on my computerCreateLifeInfo
by 1% (2~3 ms out of 230) or the entire compilation by 2~3 ms out of 11,000, which is consistent with the microbenchmark result thatdynarr := dynarr
alone takes 8 ns (× 270,000 = 2 ms).