Throw Twitter (NYSE:TWTR) and Baidu (NASDAQ:BIDU) into the ring, and it doesn't seem like a fair fight. Twitter is a busted IPO, trading well below its 2013 IPO price of $26 a share. Baidu, on the other hand, has been one of the world's best investments in the realm of internet stocks. China's leading search engine went public at a split-adjusted price of $2.70 in 2005, a glorious 64-bagger over the past dozen years since its Wall Street debut. 

However, both companies are going through some rough patches right now. Twitter's growth has slowed to the single digits, and -- in a shocking development -- we're seeing ad revenue failing to keep up with the social media platform's usage. Baidu's financial performance has taken a turn for the worse. The death of a cancer patient that found a questionable treatment center on Baidu last year has ended in regulators scaling back the way Baidu and its smaller peers can present once-lucrative health-related paid listings.

In the end, Twitter and Baidu find themselves posting their weakest growth -- and in Baidu's case, declining revenue in back-to-back quarters -- as public companies. Neither company is at its best right now, but both have near-term catalysts to begin trending in the right direction again.

Baidu's sign in Shanghai.

Image source: Baidu.

Tweet dreams

Twitter has been a painful stock for investors, but the platform is as popular as ever. There was an average of 319 million monthly active users in its latest quarter, up slightly from the 317 million it was entertaining during both the fourth quarter of 2015 and the third quarter of 2016. Ad revenue surprisingly declined, but that's unlikely to last. Advertisers are spending more to reach users online, and Twitter's hiccups as it tests out new offerings will eventually morph into monetization-enhancing opportunities. 

Twitter would be in trouble if engagement was declining or perhaps even stagnant, but that's not the case. Average daily active usage has risen 11% over the past year, a trend that's been accelerating as 2016 played out. User growth has slowed, but those on Twitter are checking their feeds more often. 

Born on the Baidu

Baidu is also having an issue with declining ad revenue. The problem -- for now -- is that its Rolodex is a lot thinner these days. Baidu closed out 2016 with 452,000 online marketing customers, 19% fewer than it was serving a year earlier. Most of that decline is Baidu turning advertisers away as it improves the quality of its marketing customers, particularly healthcare-related sponsors. The good news there is that ad revenue only slipped 8% in that scenario, so the ones sticking around are spending a lot more on average to reach Baidu users. 

Things should get better for Baidu. We'll be lapping last May's regulatory fallout in the second quarter, and year-over-year growth will be on a more comparable basis. There's also a light at the end of Twitter's tunnel, as its nascent video content strategy should start to pay off with more high-paying ads.

Neither stock is cheap by conventional measuring sticks. Even if we go out to 2018 when analysts see big bottom-line improvement at both companies, Twitter and Baidu trade at profit multiples of 38 and 23, respectively. Both companies have the ability to justify chunky market premiums if things start to go right, though for Twitter the easiest way to pop could be someone finally willing to step up and pay a premium to acquire the wide-reaching social platform. Baidu can cash in if some of its non-search businesses -- operations that have weighed down the dot-com darling's margins over recent years -- take off to the point that they can trade on their own.

The Foolish bottom line

With a more attractive valuation and clearer paths to operating improvement, Baidu would have to be the superior stock at this point. However, the untapped potential at Twitter is something that makes it dangerous to short and potentially game-changing to own. Baidu wins this battle, but don't give up on Twitter.  

Before investing in stocks, here is some advice to help beginners choose the right ones.