Modern engines can run 87 octane gas and have higher compression ratios because they have knock sensors and computers that will retard the timing if detonation is detected. Most modern engines are operating at the absolute limit of detonation on 87 octane with compression ratios well above 9:1. Without the sensors and computer, we'd have to run compression ratio's at 8:1 or less to run 87 octane.
When you're running 87 octane and your engine retards the timing, it's reducing the power output and possibly the fuel mileage. Most modern engines will simply run better on mid-grade 89 octane gas as it will provide a cushion against detonation and allow the engine ignition to run at optimal timing. Mid-grade gas is not much more expensive (as a percentage) and might cost you an extra $2.00 per fillup. I think it's worthwhile.