Diesel (a) has a slightly higher energy content and (b) has a slightly higher efficiency due to the high compression and slightly lower thermal losses due to the design of diesel engines.
For you and I, average interested consumers, the major determinant is this: $/gal fuel / MPG = $/mile. Sure, this doesnt factor in costs for entry and maintenance, but I dont know what kind of a vehicle that would be purchased. The price difference between a jetta diesel and gasser is small, compared to the price difference in say, a full size pickup.
My father has a 96 MB E300D. It gets him up to 36 MPG. Until recently, he wasnt driving it because diesel had too high of a premium - so it was cheaper for him to drive my mother's 97 plymouth breeze, which gets 30-31 MPG, but took relatively cheaper regular gasoline.
Lately, diesel has been cheaper than gasoline when Ive looked at it.
The problem is that for most people, they dont wan to run a refinery in their basement (disclosure: I do, and have run my 83 MB 300D on vegoil and biodiesel, and have quite a bit of experience with it). And I dont blame them... Despite all the hype, there are some inherent issues with both biofuels, things like rubber degradation in high bd content fuels, coking from use of vegoil, viscosity and pumping with vegoil, etc. So, for those who arent inclined to make it themselves, its a cycling issue - sometimes its cheaper to drive a diesel, sometimes its cheaper to drive a gasser.
This is of course very generic, and doesnt consider vehicular needs, size, space, etc., which may be a big determinant - for example, for a large car, nobody can give the consistant 28-30 MPG that I got in my 83 MB 300D, or the 33-36 MPG that my father gets in his 96 E300D... Im sure large trucks are the same.
Biodiesel (blends) are surely an attractive option at diesel prices over $2/gal. Then again, despite all the argument about ethanol, it probably is attractive at prices over $2.50 or so as well.
If you can make your fuel yourself, and take on the additional maintenance required, then vegoil/biodiesel is attractive. If youre willing to cross vehicle type/size boundaries (like in the example of my father), the cost per mile may change depending on vehicles that you have available. If youre tied to one vehicle and the pump, it varies, and is more of a complex question, which the answer constantly changes. IMO, the only real solution is to have two high efficiency vehicles, a diesel and a gasser, and constantly figure out which is cheaper to drive. So long as insurance isnt a big cost, youre effectively halving your wear and tear, and you can always drive the lower cost vehicle... Ive done this for many years (until my MB got smashed). But to me, having a coupel cars was a joy that had more value than money savings, etc. It wasnt necessarily the best thing from a pure economic standpoint, but then again, I did harness a lot of fuel savings by optimizing my usage patterns.
Anyway, enough babbling.
JMH