In terms of efficiency, I would say go for tankless water heater as the heating function only turns on whenever you need heated water earning it the title of 'on-demand' type water heater. In comparison to a heater with tank storage which will constantly fill the tank with water and heat it to maintain a certain temperature, it would have to keep working constantly every time the stored water cools down from the desired temperature.
As far as lifespan of these water heaters are concerned, tankless water systems would also last longer based on what I learned from
here. Also, something worth noting is the importance of adding water softeners installed to extend the lifespan of your heaters if you have hard water as the high concentration of minerals would build up residue from chemical reactions which may shorten your heater's lifespan.