As Tesla founder Elon Musk pushes to deliver the Model 3 cars to buyers, he's taken to pulling all-nighters and sleeping on the company floor.

Though the serial entrepreneur has experience working long hours and under pressure, Musk admits that he had to overcome one bad habit on the road to success: drinking large amounts of caffeinated beverages.

"There were probably times when I had like eight [diet cokes] a day or something ridiculous," Musk told the German automobile magazine Auto Bild in 2014. "I think these days it's probably one or two, so it's not too crazy."

However, coffee was also an addiction for the billionaire. "I used to have so much coffee...that I'd get really wired," he said. "I'd get over-caffeinated and it wouldn't be good."

Musk has since cut back to more "reasonable portions," which at the time was two cups of coffee a day. But the tech billionaire isn't alone when it comes to caffeine consumption.

A recent survey from the National Coffee Association found Americans are drinking coffee at the highest level in six years. Sixty-four percent of adult Americans say they had a cup of coffee the previous day in 2018, up from 62 percent in 2017.

Meanwhile, diet soda consumption has been on the decline. A Gallup poll found that 24 percent of Americans drink diet soda and 44 percent drink soda overall. However, a majority of Americans say they try to avoid drinking soda.