So how much energy does diesel have compared to gasoline?
I don't know for sure, but I believe that diesel has more.
Converting fuels to gasoline-gallon equivalents
A gasoline-gallon equivalent is the amount of fuel required to equal the energy content of one liquid gallon of gasoline. The U.S. Department of Energy uses GGE to compare equivalent volumes of fuel based on the energy content in British thermal units:
Diesel: Btus per unit, 129,800; GGE, 0.88 gallon.
Regular unleaded gasoline: Btus per unit, 114,100; GGE, 1 gallon.
Biodiesel (B20): Btus per unit, 129,500; GGE, 0.88 gallon.
Ethanol (E85): Btus per unit, 81,800; GGE, 1.40 gallons.
Liquefied natural gas: Btus per unit, 75,000; GGE, 1.52 gallons.
Liquefied petroleum gas: Btus per unit, 84,300; GGE, 1.35 gallons.
Methanol (M85): Btus per unit, 65,400; GGE, 1.74 gallons.