When investors think fast food, McDonald's (NYSE:MCD) inevitably comes to mind. After all, McDonald's is an industry giant, with more than 36,000 locations serving approximately 69 million customers in over 100 countries each day. Unfortunately for shareholders, McDonald's underlying performance hasn't lived up to its reputation. The stock is down 3% in the past two years, while the S&P 500 Index is up 28% in the same period.

As a result, investors looking to invest in fast food might want to take a pass on McDonald's. There are other fast-food competitors growing much faster than McDonald's, which is why I'd suggest investors take a bite out of Sonic (NASDAQ:SONC).

McDonald's isn't getting much right these days
McDonald's is grappling with problems across its geographic markets. Here in the U.S., McDonald's is widely perceived as a stale brand, and a relic of the past. In the international markets, McDonald's suffered from public relations nightmares in key regions like Japan and China last year, relating to food safety issues. Collectively, these pressures have dragged on McDonald's performance well into 2015.

Last quarter, McDonald's global comparable sales, which measures sales at locations open at least one year, fell 2.3%. Comparable sales fell 2.6% in the U.S., 0.6% in Europe, and 8.3% in the Asia-Pacific, Middle East, and Africa region. Total revenue declined 11%, although much of this drop was due to unfavorable currency movements. Still, even excluding currency effects, total sales declined 1%. Meanwhile, earnings per share collapsed by 23% last quarter, year over year.

As if that weren't bad enough, McDonald's also announced that it will close at least 900 of its restaurants around the globe. This decision is a reversal from McDonald's aggressive worldwide restaurant opening strategy, which previously was one of the company's key growth initiatives.

What differentiates Sonic from the pack
On the other hand, Sonic is registering very strong growth. Sonic's earnings per share doubled last quarter, thanks to an 11% increase in same-restaurant sales. Increasing traffic accounted for two-thirds of the same-restaurant sales growth, which is a clear indication that customers love the Sonic experience.

The reason Sonic is growing like a weed while McDonald's is falling behind is likely because Sonic -- the nation's largest drive-in restaurant chain -- offers a distinctly unique customer experience. Sonic is an innovator, with signature products like Master Blast Real Ice Cream treats that break the mold of the traditional hamburger-and-fries offerings.

McDonald's highly anticipated recent turnaround announcement left a lot to be desired. Among the initiatives on the docket, McDonald's is testing out an all-day breakfast strategy. While this is a smart strategy, McDonald's should have done this long ago. In fact, Sonic already offers all-day breakfast in several markets across the country.

Sonic won't leave you hungry for growth
Sonic is using its growing cash flow to aggressively expand into new regions of the United States. Sonic operates approximately 3,500 locations, the bulk of which are concentrated in the South, meaning there's plenty of room left for future unit growth. This is why Sonic expects mid-single digit comparable sales growth this year. Earnings per share will benefit from this, and also from the company's aggressive share buyback program.

Sonic repurchased approximately 5% of its outstanding shares just in the first two quarters of the current fiscal year. Looking back further, Sonic has reduced its shares outstanding by 23% since it initiated its current share buyback program in 2012. The benefits of this strategy are clear, as Sonic's stock price has surged 135% in just the past two years.

The one advantage McDonald's has over Sonic is that its 3.5% dividend yield is well above Sonic's 1.2% dividend yield. But a couple of percentage points in yield doesn't compare to how much faster Sonic is growing. Plus, Sonic is very likely to increase its dividend at much faster rates than McDonald's going forward, meaning its yield may very well catch up over time.

For investors concerned with total return, Sonic looks like the much better fast-food stock to buy right now.