That was fast.

The Tesla Shanghai Gigafactory, which was completed in 168 working days, is notable for how quickly it was built. That also means Tesla CEO Elon Musk's global expansion plans are ahead of schedule.

Tesla reported its third-quarter earnings, showing the company turns a surprise profit.

According to The New York Times, it reported $143 million in net income in the third quarter, defying analysts' expectations of a loss. Tesla said it had earnings of $1.86 per share on an adjusted basis. Revenue was $6.3 billion in the quarter.

Tesla also says it can crank out 150,000 Model 3 sedans a year, which was 65% less expensive to build than its production system in the United States. The Tesla Shanghai Gigafactory is producing "full vehicles, from body to paint to general assembly."

China, as Tesla's second-largest market, which could bring it tens of millions of potential customers, is vital to Tesla's momentum.  Chinese car buyers shelled out for 1 million electric vehicles in 2018, and should buy 2 million next year, according to a report from Bloomberg New Energy Finance. Nearly 70 percent of China's cars could be electric by 2040.

Tesla is the first foreign automaker to take advantage of China's new rule, which allows to open a factory in the country without a Chinese partner, and it exempt from 25 percent import duties.

The Tesla Shanghai Gigafactory is one of its strongest assets and will help the company to continue to be profitable in the future, especially, since it has received the full support of the Chinese government.