McDonald's (MCD -0.42%) and Starbucks (SBUX -1.02%) are two of the most well-known fast food brands in the world. McDonald's operates and franchises over 36,000 restaurants in more than 100 countries, while Starbucks owns and franchises more than 32,000 stores in over 75 markets.

McDonald's and Starbucks might seem like similar investments. The COVID-19 crisis will curb the growth of both companies this year, but both chains should recover next year with double-digit sales growth. Their dividends are also comparable: McDonald's forward yield of 2.7% is only slightly higher than Starbucks' yield of 2.2%.

A group of young people having fast food.

Image source: Getty Images.

But over the past ten years, Starbucks generated a total return of over 530% -- roughly double McDonald's total return of nearly 260%. Past performance never guarantees future gains, but Starbucks might continue outperforming McDonald's over the next ten years for three simple reasons.

1. A stronger underlying market

Over the past decade, a shift toward healthier diets and competition from "fast casual" rivals like Shake Shack and Chipotle disrupted the traditional fast food market. Regional favorites like Chick-fil-A exacerbated the pain.

McDonald's tried to keep pace by offering healthier menu items, replacing its frozen beef with fresh meat, renovating its stores, and upgrading its digital capabilities. Offering all-day breakfast also attracted more diners. However, McDonald's still faces an uphill long-term battle, since the fast casual market is still advancing against older fast food players.

Starbucks faces competition from other coffee chains, but the broader coffee market doesn't face a fundamental shift like traditional fast food chains. The global coffee market could still grow at a compound annual growth rate (CAGR) of 5.5% between 2020 and 2025, according to Mordor Intelligence, led by its growth in Asia.

2. Better growth opportunities in China

Three years ago, McDonald's took a big step away from China after selling the majority stake of its mainland China and Hong Kong businesses. It subsequently refranchised the restaurants, but the shift will reduce its long-term revenues from China.

A cup of coffee.

Image source: Getty Images.

Starbucks still considers China to be its top growth market. Its store count in China grew 15% annually to 4,351 stores last quarter, and the region generated 6% of its total revenues -- down from 11% a year ago due to the COVID-19 pandemic.

Starbucks' sales in China could rebound sharply after the crisis passes. Moreover, its top domestic rival, Luckin Coffee, seems to be headed off a cliff after a massive fraud scandal earlier this year. Luckin surpassed Starbucks in total stores in China last year, but its near-imminent implosion could significantly boost Starbucks' sales.

Mordor Intelligence expects China's coffee market to still grow at a CAGR of over 10% between 2020 and 2025 -- which outpaces the broader industry and gives Starbucks plenty of room for future growth.

3. A beefier digital ecosystem

McDonald's launched its "Experience of the Future" plan three years ago, which aimed to renovate its stores, add in-store digital kiosks, and broaden its online ordering and digital delivery options.

These efforts shored up McDonald's defenses against fast casual rivals and boosted its digital orders, but it doesn't regularly disclose its mobile-based sales and remains far behind Starbucks in terms of digital innovation.

Starbucks built its digital ecosystem atop its Rewards platform, which grew its members 15% annually to 19.4 million last quarter, over the past 12 years. Starbucks first started accepting mobile orders in 2011, and that first mover's advantage turned its app into one of the biggest digital payment platforms in the U.S.

Starbucks' "digital flywheel" -- which prioritizes Rewards, personalization options, digital payments, and ordering capabilities -- enabled it to generate 29% of its orders from mobile devices last quarter. In China, it strengthened its mobile platform with a delivery partnership with Alibaba's Ele.me -- which shored up its defenses against Luckin's digital orders.

The bottom line

McDonald's and Starbucks are both sound long-term investments. But if I had to choose one over the other, I'd pick Starbucks -- it isn't facing severe long-term challenges, it has more growth opportunities in China, and it has a stronger prisoner-taking digital ecosystem for mobile orders and payments.