I used to travel an 80 mile round trip commute in all weathers and found 97 octane would either give you a bit more pep, or more MPG. Problem if you use the extra pep your MPG did not change much but if you drove normally I did notice about an extra 10% better MPG. Modern ECU and knock sensor combination means that the ignition timing gets retarded (spark is fired later in compression stroke) if knocking is detected - this reduces power output of engine, but protects it from knocking ( when the exploding mixture tries to send piston back down without passing through top dead centre ). Knocking is hugely destructive and will wreck the engine. Pinking is a milder version of knocking and although not desirable will not destroy engine. The ECU always tries to trim the ignition to its most advanced position for maximum power, with higher octane it can run more advanced because the explosion of the mixture is fully under control of the spark and is not being ignited by heat of compression ( as the mixture starts to burn it increases pressure in combustion chamber and lower octane fuel can ignite in an uncontrolled manner as it gets squeezed harder, if the ECU fires the spark later during compression the piston is already past TDC and on its way down before this uncontrolled explosion gets going) . Direct injection petrol engines can run higher CR because at lower speeds fuel is not injected until nearly TDC on compression stroke, at higher engine speed the fuel is injected in the normal way into into intake stroke.
The ECU actually reacts quickly to any knocking detected, it needs to to prevent damage, the take away message seems to be that Knock detectors allow engines to use lower octane fuel without damaging the engine ( by retarding spark / reducing power) - the other side of the coin is that if the knock sensors are not picking up any vibs the ECU will advance spark. Car makers maybe still do ship cars to certain parts of the world with engine set up for lower octane, but I assume knock detectors mean it may not be so important ( and the 95 octane or higher fuels more widely available now).