In the US we're considering pounds per gallon rather than kilos per liter then ;)Fuels containing a higher amount of Aromatic class hydrocarbons, (or just lesser "light" hydrocarbons) will have a higher density (lb/gal) compared to fuels having lower amounts of the heavier molecules.
Also the aromatics bring with them higher antiknock ratings which can also be better for efficiency in a number of different engines.
When acceptable octane rating is achieved by ethanol content instead, it works good too, but fuel efficiency is reduced chemically because alcohol does not consist of only carbon & hydrogen, alcohol molecules also contain oxygen which provides bulk but not energy, so alcohols can be considered to already be "partially oxidized hydrocarbons" to begin with. It's really the oxidation process of the burning fuel that provides the energy, and alcohols just have less to give than hydrocarbons.
Miles per gallon is the conventionally understandable measurement units, and even fuel injectors meter the fuel in by volume, but actual energy obtained and resulting engine efficiency depends on performance per weight of fuel, not exactly per gallon directly.
During changing seasons I like to feel the metal part of the gas nozzle for temperature during dispensing. One of the worst times is when a tank trailer has been sitting in the sun a while before delivery, and it's 95 Fahrenheit when it's not even that hot outside. I like it much better when a trailer comes from northern locations where the fuel is less than 60 degrees, then I buy more but don't fill it up. It's nice when it is colder fuel to purchase and if it's a hot summer once the gas warms up to ambient conditions you end up with more gallons than you pumped, but if you are not careful the gas tank will overflow "autonomously" if you fill it too much with cold fuel when it warms up like that :0
There are a number of other factors too, but this one is often overlooked.