Alibaba (BABA 0.64%) and Baidu (BIDU 0.72%), two of China's largest tech companies, recently posted their latest earnings reports.

Alibaba disappointed investors with a top-line miss that represented its slowest growth rate as a public company, and its stock sank to its lowest levels in more than five years. Baidu beat analysts' expectations on the top and bottom lines, and its stock held steady in this wobbly market.

Does Baidu's resilience make it a better buy than Alibaba? Let's take a fresh look at these two Chinese tech titans to decide.

A person in Shanghai holding an umbrella.

Image source: Getty Images.

Alibaba's growth engines sputter out

Alibaba's revenue rose 35% in fiscal 2020 and 41% in fiscal 2021 but increased just 22% year over year in the first nine months of fiscal 2022.

Analysts expect its revenue to rise just 20% for the full year. That slowdown was caused by headwinds for its commerce and cloud businesses.

Alibaba's e-commerce segment, which generates most of its revenue and all its profits, struggled with competitive and macroeconomic headwinds.

The new antitrust restrictions for Alibaba -- which include bans on its exclusive deals with merchants, aggressive promotional pricing strategies, and unapproved investments in smaller companies -- are eroding the defenses of its commerce sites (such as Tmall and Taobao) against such formidable competitors as JD.com and Pinduoduo in China. Lazada, Alibaba's Southeast Asian marketplace, also struggles to keep pace with Sea Limited's Shopee.

That's worrisome since Alibaba usually subsidizes the growth of its unprofitable cloud, digital media, and innovation initiatives businesses with the commerce segment's profits. Therefore, the slower growth of Alibaba's commerce segment will hamper its ability to expand into other markets.

Meanwhile, Alibaba's cloud business struggled as new data privacy regulations for internet-oriented companies throttled their usage of its cloud-based services. Its smaller digital media and innovation initiatives segments also struggled to grow as China's regulators closely scrutinized the tech giant's sprawling network of smaller companies.

Alibaba's margins declined sharply throughout fiscal 2022, and analysts expect its net income to tumble 44% this year on a generally accepted accounting principles (GAAP) basis before potentially stabilizing in 2023. Its adjusted (non-GAAP) earnings are expected to dip 18%.

Baidu's balancing act is improving

Baidu's revenue rose 2% in fiscal 2019 and stayed flat in 2020. Throughout those two years, the company struggled with the sluggish growth of its online marketing business, which generates most of its revenue through the sales of digital ads and managed business pages.

Baidu owns China's largest search engine, but macroeconomic headwinds and tough competition from younger platforms, including Tencent's WeChat and Bilibili, throttled its growth. Baidu initially offset that slowdown with higher revenue from its streaming video unit iQiyi, but iQiyi eventually lost its momentum, and its ongoing losses squeezed Baidu's margins.

But in 2021, Baidu's revenue rose 16%. Its online marketing revenue increased 12% as it relied more heavily on its managed business pages than traditional ads. Its non-online marketing revenue also surged 71% as its cloud and AI businesses expanded, while iQiyi's revenue rose 3%.

Baidu seemed to benefit from the government's crackdown on Alibaba and Tencent, which throttled their growth in the advertising and cloud markets.

Baidu was also hit by minor fines regarding unapproved investments, but antitrust regulators didn't target its core search engine and cloud platform -- presumably, because they didn't collect as much data as Alibaba or Tencent did on their platforms.

Baidu's operating margin contracted in 2021 as it increased its dependence on its lower-margin cloud business and ramped up its investments, and its adjusted net income fell 14%. Analysts expect Baidu's revenue to rise 9% in 2022 and its earnings to grow 16% as it stabilizes its expenses.

The valuations and verdict

Alibaba and Baidu have both been weighed down by the unpredictable tech crackdown in China and the delisting threats in the U.S., so both stocks look historically cheap. Alibaba trades at just 12 times forward earnings while Baidu has a slightly higher forward price-to-earnings ratio of 20.

Value-seeking investors might initially be attracted to Alibaba's lower multiple, but its commerce and cloud businesses are still losing momentum. Meanwhile, Baidu's advertising and cloud businesses are growing at healthy clips and silencing the bears who assumed that Tencent, Alibaba, ByteDance, and China's other higher-growth tech companies would render it obsolete.

I wouldn't buy either of these stocks right now, especially when plenty of non-Chinese tech stocks are trading at reasonable valuations. But if I had to choose one over the other, I'd buy Baidu. Its core businesses are recovering, it's gradually expanding its ecosystem beyond digital ads, and it isn't in the Chinese government's crosshairs (at least, for now).