You joke, but code optimization is a career. If you can make something run much more efficiently, there's money to be made. I can't remember the name of the consultancy that did this though.
Yeah the job is not exactly widespread. I guess because most of that stuff is just "ship it and not our problem" (the user is used to buying new hardware every 5 years to do the same tasks anyway).