Just to add a little bit to Richards answer, besides cam timing other factors that have an impact on required octane in a real world engine are head design and material, altitude and ignition timing.