There's 2 measures of energy density. Per kg, and per liter (weight and volume).
Hydrogen scores really well on the per kg measure, and pretty bad on the per liter one.
The values are: Hydrogen 142 MJ/kg and 9.17 MJ/l.
For comparison: Fuel 46.4 MJ/kg and 34.2 MJ/l, Lithium polymer batteries 1.8 MJ/kg and 4.32 MJ/l, which is why Tesla batteries are a LOT heavier than they look.
So to answer your question: a hydrogen fuel tank (pressurized at 700 bar, also known as "you need a 10cm thick steel plate to contain this, and may God have mercy if you so much as dent it") is about 3x lighter but 3x bigger than an equivalent fuel tank, and 70 times lighter and half as big as an equivalent battery.
In case you're wondering, hydrogen in fuel is "compressed" to about 3000 bar, but in a way that's stable, not prone to sudden temperature drops and doesn't blow up if the octane number is high enough.
This is why gas/oil fuels most cars and will continue to do so unless there is a significant technological breakthrough in hydrogen fuel storage safety or battery efficiency/size.
People don't realize that a tesla sedan weighs more than an average sedan. And I laugh when people say you can keep extra tesla batteries and swap them to extend range. They think it's like changing smartphone or regular car batteries. They don't realize that tesla batteries weigh 1300 lbs. Good luck with that.
Once there is a real breakthrough by either the hydrogen fuel side or the battery side, society will steadily and gradually switch to one or the other and leave gas fuel behind. But who knows if/when such a breakthrough will happen. Either way, we are going to be using gas fuel for a few decades at the very least.
I don't think there's any need for a breakthrough in order to have world wide massively adopted electric cars.
The only bottleneck right now is battery production, not even demand.
The technology is here, the demand is here, the supply chain is being adapted so that price (not weight) drops.
I don't see how the weight of a car has any meaningful impact on adoption. Speaking of which, adoption is usually an S curve and I fail to see how electric car's adoption would be any different. That makes it everything but "steady" and it will take pretty much everyone by surprise, like any other technology before (computers, internet, laptops, smartphones... and petrol cars). That raises many interesting questions about the readiness of each country's infrastructure but that's another debate.
> I don't think there's any need for a breakthrough in order to have world wide massively adopted electric cars.
It's not a matter of opinion. candiodari posted the metrics just a few comments up. Gas/Hydrogen has 4 to 8X better power to weight ratios.
> The only bottleneck right now is battery production, not even demand.
No. It's also demand. Most people want big gas guzzling trucks and SUVs.
> That makes it everything but "steady" and it will take pretty much everyone by surprise, like any other technology before (computers, internet, laptops, smartphones... and petrol cars)
S curve applies to something "revolutionary" or better. Electric cars aren't better than gas cars. Regular cars are cheaper, get more mileage and are much more efficient (and powerful) than electric cars. The only thing going for electric cars is they pollute less.
Smartphones did something that telephones couldn't. Computers did things typewriters couldn't. Cars did things that horse carriages couldn't. That's not the case between gas powered cars and electric cars.
About that infrastructure: it isn’t only about charging infrastructure. If most cars become electric cars that weigh twice as much as existing cars and accelerate much faster, wear and tear on road surfaces and bridges will go up (or won’t it? Will accelerating more smoothly offset that?)
Certainly, in the USA, a country that already has problems maintaining its road infrastructure, that could become problematic.
I think hydrogen is here to stay. Japan is going full throttle on hydrogen, phasing out gas to a great extent in the next generation or so. The technology is viable and working already, just needs state sponsoring and determination to make it happen.