Optimal blocks aren't really a priority for miners because the fact that you win the race is worth, ballpark, 250X (the coinbase transaction's segniorage award of 25 BTC) what the transaction fees for the transactions included in the block is. Optimizing for a few percent extra transaction fees doesn't meaningfully change the economics, and if it slows you appreciably, could potentially cost you that segniorage if someone else beats you to the punch.<p>Accoringly most miners appear to just use really cheap heuristics.