Tencent (OTC:TCEH.Y) and Alphabet (NASDAQ:GOOG) (NASDAQ:GOOGL) are two of the world's most influential tech companies.

Tencent's sprawling portfolio includes market-leading gaming, mobile messaging, advertising, cloud, and media streaming businesses. Alphabet's Google dominates online searches, its Android OS leads the smartphone market, and it reaches over two billion users with YouTube.

Tencent's stock has surged nearly 50% over the past 12 months, compared to Alphabet's gain of roughly 35%. Let's see why the Chinese tech giant outperformed Alphabet, and if that trend will continue in the future.

An investor checks a trading screen while talking on the phone.

Image source: Getty Images.

Why did Tencent attract the bulls?

Tencent is the world's largest video game publisher. Its portfolio of hit games includes League of Legends, Clash of Clans, Honor of Kings, and major stakes in Fortnite maker Epic Games and PUBG maker Bluehole. The gaming segment generated 35% of Tencent's revenue last quarter, and grew throughout the COVID-19 crisis as more people stayed home and played games throughout the lockdowns.

Tencent's online advertising business, which generated another 19% of its revenue, also flourished as gaming, online education, and e-commerce companies accelerated their ad purchases across its platforms to attract stay-at-home consumers. That growth offset slower ad sales to the pandemic-stricken travel, auto, and fast-moving consumer goods sectors.

Tencent's fintech and business unit, which generated 24% of its revenue last quarter, also benefited from the stable growth of its payments platform WeChat Pay and its Tencent Cloud services, which were both naturally resistant to the pandemic.

All three of these core businesses generated double-digit revenue growth last quarter, and Tencent's total revenue rose 26% annually in the first quarter as its adjusted net income (which excludes its investment-related gains) rose 6%. Including its investment and acquisition-related gains, its net income jumped 29%.

Analysts expect Tencent's revenue and adjusted earnings to rise 22% and 17%, respectively, for the full year.

Why were the bulls less excited about Alphabet?

Alphabet might seem like a "jack of all trades", but Google's online ads still generated 82% of its revenue last quarter. Alphabet's heavy dependence on ads leaves it more exposed to macro headwinds than Tencent, which can fall back on its diverse gaming, cloud, and fintech businesses.

An online search box superimposed on a photo of a laptop.

Image source: Getty Images.

Google's traffic acquisition costs (TAC), or the payments it makes to companies that redirect traffic to its search engine, remained steady year-over-year at 22% of its total ad revenue. However, that percentage could rise as the COVID-19 crisis throttles ad purchases and fierce competitors -- including Facebook and Amazon -- expand their advertising platforms.

Alphabet started disclosing its YouTube and Google Cloud revenues earlier this year, but it didn't reveal if either platform was profitable. But both businesses are likely crimping Alphabet's operating margins instead of bolstering them -- YouTube's expansion requires high hosting and revenue-sharing expenses, and Google Cloud probably doesn't have much pricing power against its larger rivals Amazon and Microsoft in the cutthroat cloud market.

Alphabet's strengths are still offsetting its weaknesses, and its revenue rose 13% annually in the first quarter. However, an increased headcount and higher investments (especially in Google Cloud) caused its adjusted earnings to decline 17%.

Analysts expect that trend to continue for the full year, with 5% sales growth and a 15% earnings decline.

The valuations and verdict

Both stocks are trading at premiums to their earnings growth: Tencent trades at 38 times forward earnings, while Alphabet has a forward P/E of 36. That's likely because investors consider both tech giants to be safe stocks for a volatile market.

Tencent and Alphabet are still both solid long-term investments. But if I had to choose one over the other, I'd buy Tencent for its better-diversified business, stronger growth rates, and higher-growth investment portfolio. Alphabet is still too heavily exposed to the macro-sensitive ad market, and it's ramping up its spending as that core growth engine cools off. In other words, Tencent deserves its premium valuation right now, but Alphabet doesn't.