The expansion of the trade war into a tech war between the U.S. and China is casting a spotlight on the top tech companies in both markets. Today, let's examine two of those companies: Chinese search leader Baidu (BIDU 0.29%) and American chipmaker Intel (INTC 0.41%).

At first glance, Baidu and Intel don't have much in common. Baidu generates most of its revenue from ads, while Intel makes most of its money selling CPUs. However, both companies' interests overlap in computer vision technologies and driverless cars. Intel is also a partner in Project Apollo, Baidu's open platform for autonomous vehicles.

Network connections across a city.

Image source: Getty Images.

Intel's stock held up much better than Baidu's over the past 12 months. Intel slipped about 6% as it struggled with an ongoing shortage of CPUs, but Baidu tumbled over 50% as the growth of its ad business hit a brick wall. Will those trends continue, or is Baidu finally poised for a comeback?

Which company is growing faster?

Baidu and Intel both struggled with slowing sales growth over the past year.

YOY revenue growth

Q1 2018

Q2 2018

Q3 2018

Q4 2018

Q1 2019

Baidu*

31%

32%

27%

22%

15%

Intel

9%

15%

19%

9%

0%

YOY = Year-over-year. Source: Company quarterly reports. *RMB terms, excludes upcoming divestments.

Baidu's ad business, which generated nearly three-quarters of its sales last quarter, faced a slowdown in the Chinese economy, competition from other platforms (like Tencent's (TCEHY -1.53%) WeChat, and the depreciation of the yuan against the dollar.

Baidu is offsetting some of that weakness with the growth of iQiyi (IQ -1.97%), the video platform it spun off in an IPO last year. Baidu still maintains a majority stake in iQiyi and funds a lot of its content. That's a double-edged sword, since iQiyi still doesn't generate any profits from its robust sales growth.

Intel faced a slowdown in its data center group, which generated 30% of its sales last quarter. That division faced more cautious enterprise spending, tougher headwinds in China, higher inventory levels, and tougher year-over-year comparisons.

Intel's client computing unit, which generated over half its revenue, also struggled with an ongoing chip shortage which was partly offset by healthier demand for enterprise and gaming PCs. That unit previously produced modems for Apple, but it lost those orders earlier this year to Qualcomm.

Intel's smaller memory chip unit is struggling with lower market prices, and sales of its programmable chips stalled due to lower spending from cloud and enterprise customers. Those declines were partly offset by the continued growth of its smaller IoT unit, which remains invested in side bets like driverless cars.

A woman reads a book in a driverless car.

Image source: Getty Images.

Baidu and Intel both offered grim guidance last quarter. Baidu expects its revenue to stay nearly flat year-over-year for the second quarter, and analysts expect its revenue to rise just 5% this year. Intel expects its second-quarter revenue to fall 8% annually, and for its full-year revenue to dip 3%.

Which company is more profitable?

Baidu's slowdown is disappointing, but its loss of 327 million RMB ($49 million) last quarter -- its first loss since its IPO -- torpedoed the stock. That decline was mainly caused by its higher content costs for iQiyi and a costly (and ineffective) TV marketing blitz during the Chinese New Year.

Baidu's ongoing investments in Mini Programs for its mobile app, AI technologies, driverless cars, and smart speakers exacerbated the pain. But without those investments, Baidu risks losing ground to Tencent, Alibaba, and other tech giants with expanding ecosystems. Analysts expect Baidu to stay profitable on an annual basis, but its earnings could plunge 51% this year.

Intel remains firmly profitable, but it expects its adjusted EPS to dip 5% this year as it struggles with lower data center chip demand and tries to resolve its chip shortage issues.

The longer Intel takes to resolve its capacity issues, the more likely OEMs will buy more chips from AMD (AMD 0.40%), which would apply additional pressure to its top and bottom line growth. On the bright side, the U.S. government's recent decision to shut down AMD's Chinese data center chip venture could boost Chinese orders for Intel's Xeon chips again.

The winner: Intel

Both companies face tough headwinds, but Baidu is in more trouble than Intel. Baidu's ad business is withering as it plows more money into adjacent markets, but those investments will throttle its near-term earnings growth. Intel also faces challenges, but they're mostly cyclical or self-inflicted wounds. If Intel gets its act together later this year, its sales of PC CPUs should climb again as its data center business recovers.

I'm not a fan of either stock, but Intel -- which trades at less than 11 times earnings and pays a decent 2.6% forward yield -- looks like a better bet than Baidu, which has a higher valuation and doesn't pay a dividend.