A diesel-electric engine is a diesel generator, a diesel engine that drives an electric generator. The generator feeds electric power to an electric motor which turns a driveshaft. Its efficiency is higher than when an engine drives a shaft through gears. Most locomotives and many ships use diesel-electric drive.