The octane requirement of an engine in a vehicle can be measured on a chassis dynamometer with a standard series of reference fuels. Racers are not expected to conduct these tests but must be able to recognize when they need a higher-octane number gasoline. Keep in mind that higher octane does not mean more power unless your engine is experiencing detonation. If racers are not sure if detonation exists, try a higher octane gasoline and see if their speeds and e.t.s improve. If they do improve, probably the engine was experiencing detonation.
Many factors significantly increase an engine's octane requirement.
Also, cast-iron heads need more octane than aluminum heads. The octane number of a gasoline is a measure of its resistance to detonation. Detonation occurs when the octane number is too low for the engine and its operating conditions. Detonation causes the maximum pressure in the combustion chamber to be reached before the piston reaches top dead center and pushes down the piston before it has reaches the top of its travel. Much of the gasoline's energy is wasted in trying to move the piston up while the high-pressure gasses are trying to push it down.