Costco Wholesale (COST -0.24%) has been a darling of investors for decades. The stock has delivered a total return of 250% over the past decade, after gaining more than 400% in the previous 10 years.

COST Total Return Price Chart

Costco Total Return Performance, data by YCharts.

However, Joel Greenblatt -- author of You Can Be a Stock Market Genius and one of the most successful investors of his generation -- isn't a fan of the discount warehouse club these days. Greenblatt recently revealed that his fund is short shares of Costco. Is he right to be betting against Costco's long track record of success?

Growth has ground to a halt

Greenblatt's main argument against Costco appears to be that the company continues to have a lofty valuation even though its growth has slowed dramatically.

It's a good point. Following the Great Recession, Costco's revenue increased at an impressive high-single-digit compound annual growth rate for five years. However, the company's revenue growth has tailed off since the beginning of 2015.

COST Revenue (TTM) Chart

Costco Wholesale Corporation Revenue (TTM), data by YCharts.

Initially, Costco's slowing growth could be traced to falling gas prices (impacting sales at Costco gas stations) and the strong dollar (reducing the dollar value of sales in foreign markets). But in the past year, those headwinds have faded, yet revenue growth has remained lackluster.

For example, Costco's revenue was up just 2.2% year over year last quarter. Excluding the effects of gas price deflation and the strengthening dollar, comparable sales increased 3%. That is down from a rate of 6%-7% comp sales growth in previous years.

Organic growth slowed even further in September, as core comp sales rose just 1%. Comp sales didn't grow at all in the U.S. Some of this weakness can be attributed to falling food prices, but customer traffic growth is also slowing. Traffic rose less than 2% in September.

Slow earnings growth

Earnings growth has also slowed to a crawl, due to the combination of meager revenue growth and rising wages. Last quarter, earnings per share came in at $1.77, up about 2% year over year. That's roughly in line with the trends seen throughout Costco's recently ended 2016 fiscal year.

Costco's earnings barely grew last year. Image source: The Motley Fool.

Meanwhile, membership fee revenue, which accounts for the vast majority of Costco's pre-tax income, rose 6% year over year last quarter.

Costco stock currently trades at 28 times trailing earnings and 25 times forward earnings -- a generous premium to the market average. Even if Costco's membership fee growth reflects the company's long-term earnings trend better, it isn't enough to justify the stock's lofty valuation. Costco may be doing better than most retailers, but right now it isn't appreciably outperforming the market as a whole.

Can Costco get back on track?

Costco recently raised its membership fees in some international markets, which will boost pre-tax income by about $50 million over the next two years. It may soon follow that up with a fee increase in the U.S. and Canada, which would probably add about $200 million in pre-tax income over two years.

Thus, earnings growth could accelerate in the next year or so. Indeed, many Costco bulls have been looking forward to the next round of membership fee increases for more than a year. However, it's important to recognize that Costco tends to wait five or six years between membership fee increases. Besides, any uptick in growth from a fee increase would be a short-term fix.

A return to stronger sales growth would be a more sustainable lever for long-term earnings growth. Over the next six months, Costco expects the impact of deflation to fade, which could set the stage for faster growth. Costco's new co-branded credit card, which offers 2% cash back at Costco warehouses, could also encourage customers to spend more.

Given Costco's long track record of growth, Joel Greenblatt's decision to short the stock seems quite risky. There's no guarantee that the stock will fall just because it has a high valuation today. But unless Costco can reignite its sales growth, it looks like this stock's market-beating days may have reached an end.