Ha, that was quite a twist at the end there. Was this due to your self-created redundancy?
I've made similar improvements (40x speedup, 8x reduction in RAM footprint) and had been shown the door. This was for software that was a bit over 30 years old too so it was a bit involved.
The team winning does not help a narcissist feel better. You'd be better off getting nothing done while stroking their ego daily.