ON compression ratio:
You need to recognize that on our engines, compression ratio and expansion ratio are the same. IOW, you have to look at the effects on ALL FOUR STROKES of the four-stroke cycle.
On the intake stroke, a higher compression ratio will enhance breathing for a given head/cam/valve combination. This is because the rapid expansion from TDC produces a faster and greater pressure drop, which initiates cylinder filling both earlier and with greater velocity.
On the exhaust stroke, you will see the same benefit in reverse. The rapidly decreasing volume near TDC will cause peak pressure to rise faster and farther. This means that exhaust leaves the chamber more efficiently and at higher velocity.
On the compression stroke, higher compression means that you will achieve a sufficient temperature for combustion earlier in terms of crankshaft degrees. This allows for more timing advance if you want it. Since the chamber is sealed on the compression stroke, higher compression means that you will have higher temp and pressure at TDC (ignoring fuel injection). It also means that for a given amount of injection timing, you will have higher peak combustion temps, more NOx, and a faster rate of burn (given enough O2).
ON the power stroke, a higher compression/expansion ratio means that the engine will extract more of the available power from the fuel. The greater expansion also means you will see lower EGT, ceteris parabus.
In general, a higher compression ratio is good. But not all by itself-- the engine has to be set up for it. And many times, higher compression brings costs that outweight benefits. For example, trying to keep the head on with higher compression AND advanced timing is quite a challenge. There's also the diminishing returns aspect mentioned by COMP461-- if you are throwing 80psi at the engine, higher compression isn't going to help you much, and may HURT because your compressing the charge to the moon when you don't need to. If you need 600psi peak compression for efficient combustion, then squeezing to 900psi isn't giving you much return on investment.
Also, if the engine has super restrictive breathing, then higher compression will make better use of the available breathing, but OTOH, the restrictive breathing really limits the benefits of higher compression. Higher compression REALLY shines in situations where you have big, high-flow heads that are free flowing.
Compression and timing are things that have to two-step together. Note how the factory CRs keep getting higher, even as injection timing gets more retarded. This is because of emissions management (have to keep peak temps low for NOx emissions), so timing is grossly retarded, and higher compression helps to offset that somewhat.
Compression and timing can only be optimized for ONE combination of RPM and BOOST pressure. Everything else is a compromise. Different boost pressures at the same RPM need different compression ratios and timing. And different RPM at the same boost pressure need different compression and timing.
Thus, there's no ideal compression ratio you can build in. Almost every engine will pass through its "ideal" for a split second from time to time.
It's just nothing but compromises of compromises.