You're not going to find much similarity between Baidu (BIDU -1.13%), the leading Chinese search provider, and Texas Instruments (TXN 0.96%), one of the top makers of analog and embedded processors.

But there are a few things both have in common: Each company has delivered solid returns for shareholders over the years, and both are facing near-term challenges based on macroeconomic issues.

Let's compare both companies to find out which stock is the better buy.

A woman standing at a crossroads with her hand behind her head.


The search giant is down, but not out

Baidu is often described as the "Google of China." Although the company has faced mounting competition from other Chinese tech giants, you can still argue that Baidu has a wide moat based on its position as the No. 1 search provider in the Middle Kingdom. Baidu's leadership in search allows it to collect tremendous amounts of data from its vast user base, which makes its search results more relevant, and, in turn, attracts more advertisers to Baidu's platform.

Baidu has grown enormously over the last decade, going from less than $1 billion in revenue in 2009 to $14.9 billion last year. Growth has slowed as Baidu has increased in size, but it's still posting solid gains on the top line. In the first quarter, adjusted revenue climbed 21% year over year.

However, the company reported a loss on the bottom line due to heavy investments in video streaming content and customer acquisition costs. The loss caught investors by surprise, which caused the stock to plummet following earnings.

Like its U.S.-based counterpart, Baidu has a roster of other businesses that generate a small percentage of revenue but could each grow into sizable businesses with time. These include investments in self-driving cars (Apollo), video streaming (via its majority ownership of iQiyi), and Baidu's DuerOS voice assistant technology. Revenue from these businesses soared 73% year over year and made up 27% of total revenue in the first quarter.

On the surface, a 21% revenue growth rate for the first quarter looks healthy, but investors are concerned about slowing growth in Baidu's online marketing business, where revenue increased only 3% year over year last quarter due to macroeconomic issues weighing down ad spending in China. The stock price has been cut in half over the last year, but at a forward P/E of just 23 times this year's earnings estimates, Baidu could be a steal at these levels relative to its long-term growth potential. 

The ad business should bounce back once the trade wars are resolved, and whenever that happens, Baidu should be in a stronger competitive position. The company has 1.1 billion monthly active users on mobile, which it is working to better monetize with additional in-app services. Plus, some of the deceleration in the online marketing business was due to some advertising customers having to shift their ad landing pages over to Baidu's platform, which recently caused some disruption in growth.

Overall, I believe the Chinese search giant will get through the near-term challenges, as it has before, and remain a solid growth stock for investors.

An ATM that also produces analog chips

The maker of analog and embedded chips for everything from personal electronics to cars is also experiencing near-term issues. After several quarters of strong growth, the semiconductor industry entered a downturn last fall, which has hurt sales at Texas Instruments recently. In the first quarter, revenue dropped 5% year over year, and analysts expect the company's revenue and profits to both be down for the year. 

It may take a few quarters before TI returns to growth. Meanwhile, management continues to focus on maximizing free cash flow and returning all of it to shareholders through share repurchases and dividends. Over the last year, the company's free cash flow jumped 22% despite the decline in revenue, which management credits to the strength of its business model. Over the last year, the company distributed a total of $8.4 billion -- an increase of 58% year over year -- via share repurchases and dividends. 

One of the ways management is maximizing free cash flow is through initiatives to improve margins, which are already well above average given the company's sky-high operating margin of 44%. TI is still in the process of transitioning production from 200-millimeter wafers to 300-millimeter, which is expected to push gross margin higher. 

Long term, TI should continue to benefit from secular growth tailwinds in the industrial and automotive markets, which offer the best growth prospects and profitability. However, TI is such a large company, manufacturing processors for so many different industries, that investors shouldn't expect more than a single-digit growth rate on the top line. Analysts expect TI to grow earnings 8.5% per year over the next five years. 

Which is the better buy?

Both Baidu and Texas Instruments have advantages in their respective markets that should deliver returns for shareholders over many years. But this better buy contest comes down to valuation.

Looking ahead to next year's earnings estimates, Baidu trades at just 15 times the consensus earnings estimate for 2020, whereas TI trades at a more expensive 19 times. Still, income investors may favor TI for its shareholder-friendly capital returns and the stock's generous dividend yield of 2.77%.

The main drawback with Baidu is that the stock may experience more volatility than shares of Texas Instruments. That is something investors need to be prepared for with any Chinese growth stock, but if you're looking for the stock that can deliver the best total return over the next decade and beyond, Baidu looks like the better buy at current prices.