I remember when I first joined the USN back in 1956,
I was on a destroyer deployed to Japan. I was amazed at the devices that hung over the sinks in Japan that were a thin cabinet and whenever you turned the hot water on,
the tank had a gas pilot lite that started a burner and the hot water flowed from the tap in less than 15 seconds.
Real neat device and I thought that it was much more efficient than heating up 40 gallons of water 24hrs a day.
I don't think that electricity would heat water as fast but with the latest advancements in technology, probably a possibility now.
I saw the water heater devices in stores and homes in Japan. It even worked on a shower and the water was very comfortable temperature..
Oh, for those days...