Tencent (OTC:TCEHY) and Amazon (NASDAQ:AMZN), two of the largest tech companies in the world, have generated massive returns for investors over the past decade. Tencent's stock surged 1,360% as it expanded its gaming ecosystem and WeChat, China's most popular messaging platform. Meanwhile, Amazon's stock rose 1,820% as it dazzled investors with the growth of its e-commerce and cloud platforms.

Digital icons superimposed on a computer screen.

Image source: Getty Images.

These two stocks aren't often compared to each other. Tencent generates most of its revenue in China, where Amazon only has a limited presence. However, they have overlapping interests in China's cloud market, and both consider Alibaba (NYSE:BABA) to be a top rival.

Tencent and Amazon probably won't generate comparable returns over the following decade due to the law of large numbers, but they could still have plenty of room to run. Let's examine both stocks to see which is the better buy.

Tencent's strengths and weaknesses

Tencent generated 35%, 24%, and 16% of its revenue from its gaming, fintech and business services, and online advertising segments, respectively, last quarter. The rest came from its other businesses and investments.

Tencent is the largest game publisher in the world. Its portfolio includes hit games like Honor of Kings, League of Legends, Peacekeeper Elite, and PUBG Mobile. Its fintech and business unit houses WeChat Pay, which holds a near-duopoly in China's payments market with Alibaba-backed AliPay, and Tencent Cloud, China's second-largest cloud platform after Alibaba Cloud. Its online advertising business sells ads across WeChat, Tencent Video, and other apps and platforms.

Tencent's gaming business has thrived throughout the COVID-19 crisis as more people stayed at home and played video games. The growth of its online advertising business also accelerated as clients across the online education, gaming, and e-commerce sectors ramped up their spending to target stay-at-home consumers.

However, Tencent still faces fierce competition in the gaming market from rivals like NetEase and in the advertising market from nimbler rivals like ByteDance's TikTok (known as Douyin in China), and competes against Alibaba in the fintech and cloud markets. Moreover, Tencent only trades on the OTC market in the US, and newly proposed regulations could force it to delist those shares.

Amazon's strengths and weaknesses

Amazon generated 61% of its revenue from its North American business last quarter, another 25% from its International business, and the remaining 14% from Amazon Web Services (AWS), the world's largest cloud infrastructure platform.

E-commerce buttons on a computer keyboard.

Image source: Getty Images.

Yet 77% of Amazon's operating profits came from AWS -- so it technically subsidizes its lower-margin marketplaces with its higher-margin cloud business.

This unique business model enables Amazon to pull shoppers away from other retailers with aggressive promotions and loss-leading strategies. Amazon Prime, which surpassed 150 million subscribers last year, continues to lock shoppers into its ever-expanding ecosystem.

Amazon also became the third-largest online advertising platform in the U.S. after Alphabet's Google and Facebook in 2018, but the business still generates a small percentage of the company's total revenue.

Amazon's online marketplaces continued growing throughout the COVID-19 crisis as brick-and-mortar stores shut down, but it incurred over $600 million in safety-related expenses last quarter, and expects those costs to surpass $4 billion in the current quarter.

Amazon dominates the e-commerce and cloud markets, but it still faces intense competition from superstores like Walmart and Target, and its growing dependence on third-party marketplace sellers is causing quality control issues. Microsoft's Azure also remains a formidable rival in the cloud market.

Which stock is cheaper relative to its growth?

Analysts expect Tencent's revenue and adjusted earnings to rise 22% and 17%, respectively, this year. That's a decent growth rate for a stock that trades at about 33 times forward earnings.

Tencent's gaming business should continue thriving in China and overseas markets, its cloud business should profit from the surging usage of storage and streaming services, and its advertising business should remain more resilient than older ad platforms like Baidu.

Wall Street expects Amazon's revenue to rise 23% this year, but for its earnings to decline 18%. Amazon's earnings could rebound next year after the pandemic ends, but the stock isn't cheap at 100 times forward earnings.

Amazon's e-commerce and cloud businesses will continue growing over the long term, but its earnings will remain under pressure as COVID-related safety costs rise, consumers buy more low-margin essentials, and competition in the cloud market throttles AWS' ability to raise prices. The recent unrest in America could also cause temporary shutdowns across Amazon's logistics network.

The winner: Tencent

I own shares of Tencent and Amazon, but the former is a better buy than the latter at current prices. Tencent's U.S. investors face unpredictable regulatory headwinds, but its dominance of multiple high-growth markets arguably outweighs those risks, and the stock is much cheaper relative to its earnings growth.

Amazon is still a great stock to hold over the long term, but its valuation and 34% rally this year suggest investors are underestimating the near-term threats.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.