A while back I picked up retro programming as a hobby. When programming for the 8086 DOS platform, Open Watcom is indispensable. It runs on both Linux and Windows, produces DOS binaries, has detailed documentation and a whole arsenal of tools. It’s also rather fast and produces performant code. Unfortunately there isn’t much documentation about how exactly the compiler optimises code. Knowing that would be useful for avoiding unnecessary code optimisations, of which I made plenty, not knowing what the compiler already could do.
This being 2026, I asked my friendly neighbourhood AI to scan through the compiler’s code and write a report on the optimisations the compiler performs. The report is here: https://github.com/ggeorgovassilis/public/blob/master/open%20watcom/8086_optimizations_report.md