Let me start by saying that this is just what I've learned, and I'm no expert
. Anywhoo, most cars make max power at an a/f ratio of 12.5-13.5 to 1. Having more fuel doesn't optomize anything, it just hurts performance. The reason we add fuel on top of what makes the max power is because of heat. The extra fuel is used to cool down the cylinders and combustion process by absorbing some of the heat from them and getting expelled out of the exhaust. This is to make our engine's run safely. If we didn't need the extra cooling that fueling beyond 12.5 to 1 gives, we wouldn't make the a/f ratio any richer then that. The optimal a/f ratio is where you can get it so the engine/egt's aren't too hot and you're makin the power you want.
The lower the boost/rpm the cooler the engine will run. As the rpms/boost go up, the engine will generally run hotter often creating a need for richer a/f ratios. Usually higher octane fuel makes it easier for the engine to run cooler which allows more boost and a leaner a/f ratio.........