Fuel quality and compression ratios are a huge factor in preventing detonation. A octane rating is a measure of a fuels resistance to burning. That is why high compression engines require high octane fuel. Higher compression makes more heat. Typical pump gas will only support on average 10:1, or 10.5:1 compression safely. Anything over that and you can can have trouble with engines knocking, pinging, or run-on after you turn off the ignition. Our open modified dirt track engines will be in the 13-14:1 compression ratio range with over 600hp, and racers will typically run 110 racing fuel, or straight methanol. It is actually better to have too much fuel than too little as too much fuel will flood your engine, but typically not cause any sever problems. A lean engine with detonation problems can destroy a new engine in a few minutes if the detonation is severe enough. We see racers all the time who have trouble with detonation either do to poor fuel quality, not enough fuel, timing problems, etc burning up $700 sets of pistons. There are many reasons detonation can occur, TEC's explanation in the #3 post is a good explanation.