@NoBeret
The worst code I ever saw (twice!) was a symbol table built as an unsorted list.
The first time was in the early 1980s in a VAX program to process the user usage logs. The unsorted list performed poorly with over 1000 active users / month.
The second time was a Jovial to Ada translator. Worked OK until I fed it an F-16 program that had a LOT of symbols. Over 3 CPU days - still did not finish. After recode to a hash table - done in under 15 minutes.