On the plus side, since it appears that he understands that you don't optimize the thing that takes 2 ms (application code) while there are things taking 200 ms (database roundtrip) or 700 ms (page rendering), he is probably better at optimization than half of the professional engineers I know.
God save me from one more code review where somebody made a for loop over months in the freaking year an obtuse nightmare because they had (mostly wrong!) ideas about how they could shave off a few processor cycles twelve whole times. (Inline functions for extra speedup! Forget standard math operators, lets twittle bits! Business objects are for wimps, we'll stick everything in one String -> String hash table and compose the keys with inlined uncommented StringBuilder monstrosities!)
At that age my dad was teaching me and my siblings circuit debugging and my mom was teaching us programming on CP/M. Valuable stuff. If anyone thinks this is "too advanced", I respectfully suggest that this stuff is just too new to be mainlined into the traditional curriculum. Process analysis is as powerful, simple and vital as any chemistry or maths.
Programming, and analysis is tremendously valuable skill for a kid this age to start learning. I've been gently bringing this sort of thing up to my kids since they were old enough to understand the words I was using.
My dad taught me he wasn't afraid to kick me in the ass (actually) if I stepped out of line (figuratively). It was actually a useful lesson and helped me to reconsider my attitude to others and stop being a dick.