There were even things I thought I had to manually optimize in the early 2000s that the GCC optimizer was already taking care of in the mid-90s.
As an example of the kinds of optimisations that the best human programmers were doing before compilers took over, see Michael Abrash's Black Book: https://www.phatcode.net/res/224/files/html/index.html - you can intuit how a human might organise their code to make the most of these while still keeping it maintainable.
games/gb didn't save the sram in the emulator save files, so upon restoring the snapshot and saving in the cartridge memory you got a mismatch. It got fixed really fast, the emulators are really simple plan9 C compared to anything else.