Cause of the reduction in consumption in modern petrol (compared to diesel)

Hello all, I have seen that modern petrol engines (direct injection, turbochargers) have made enormous progress in terms of consumption in recent years (let’s say the last 10 years). With diesel, it’s more like going in the other direction, probably due to exhaust gas cleaning. But I find it hard that comparable petrol engines often only take one litre more (in real operation) than a modern diesel. Can anyone explain this development in more detail?