Re: The Worst...
In my first job (all mainframes in those far off days) we had a subroutine which was included in hundreds of COBOL programs. It took a value, a transaction date and a code which indicated the type of VAT to be applied (standard, exempt, zero-rated, luxury goods) and returned the VAT applicable. Depending on the transaction date, it could even report the rate for "Purchase Tax", which predated VAT.
With Budget Day approaching, I was tasked with being ready to make a speedy update. I read the code and was amazed how inefficient the original author had made it.
A single variable was used to index into the tables of dates and applicable VAT rates. It was defined as "PIC S99".
Incrementing this variable meant converting to binary (taking notice of whether the first character was "+" or "-", adding one and then converting back to characters.
Changing this to "PIC 99 USAGE COMPUTATIONAL" (no sign, because the index could never be negative) caused the compiled size of the routine to reduce by 95%.
There was no change in the VAT rate that Budget Day, but we made certain that every possible recompilation used the new version. Time, memory and disk space all saved!
Then it was off to what was described on the office phone list as "Canteen (Duke of York)".