Comparable-store sales growth is the mantra of all retailers. But when the top line hits a speed bump, it gets tougher to bring home the bottom line.

Reviewing the last four quarters, O'Reilly Automotive (Nasdaq: ORLY) has proved this in spades. The company really knows how to bring home the bacon when comps are strong. But when top-line growth decelerates, earnings growth seems to fall in tandem.

% Change

Q1

Q2

Q3

Q4

Comp Sales

6.8%

2.0%

4.3%

2.1%

EPS*

18.3%

4.4%

9.6%

0.0%

Source: O'Reilly Automotive earnings releases. *Earnings per share.

Earnings growth skidded to a halt despite the fourth quarter's 2.1% increase in same-store sales and 8.2% rise in sales. The culprit?

My first guess would have been that O'Reilly was the victim of one-time costs relating to its on-again, off-again attempts to acquire CSK Auto (NYSE: CAO). However, the main contributor to the earnings stall actually was higher operating expenses, which rose 110 basis points, mainly thanks to higher store payroll and a loss of leverage resulting from a rapid sales slowdown.

O'Reilly has been coasting for some time now, as customers are scaling back discretionary spending. While AutoZone (NYSE: AZO) showed last quarter that it can still burn rubber, rivals are showing signs of industry weakness. Advance Auto Parts (NYSE: AAP) just reported negative comps for its most recent quarter, while guiding analysts toward flat results in 2008. Meanwhile, Pep Boys (NYSE: PBY) is in the midst of restructuring its business.

To me, O'Reilly has the best long-term growth prospects in the sector, it just needs to tighten its belt a bit on the expense side. If the company can remain disciplined in its spending habits, O'Reilly should be positioned to thrive when the economy finally ignites its growth engine again.

Related Foolishness:

Fool contributor Timothy M. Otte surveys the retail scene from Dallas. He welcomes comments on his articles, but doesn't own shares of any of the companies mentioned in this article. The Fool has a disclosure policy.