Source: Wikimedia Commons

Discount retailer Costco Wholesale (COST 0.17%) struggled last quarter, which continued a recurring trend of disappointing results from the retail sector. The economy slowed down in the first three months of the year, due mostly to brutal winter weather which persisted well into traditionally warm months. In fact, the U.S. Commerce Department recently revised downward its estimate of first-quarter gross domestic product. The economy actually shrank at a 1% rate annualized in the first quarter.

Not surprisingly, quite a few major retailers such as Wal-Mart Stores (WMT 1.32%) have posted weak results to start the year. When it comes to Costco, however, it's a different story. Costco's recently released earnings report was actually quite strong. Costco is managing not just to survive the weak environment for retailing more broadly, it's thriving.

That's why you'd be wise not to get too caught up in all the negative sentiment regarding retailers right now, particularly as it pertains to Costco. In the retailing space, Costco is a diamond in the rough.

Costco is weathering the storms
It's been a notoriously rough climate for retailers. Extreme cold weather caused economic activity to grind to a halt. Big-box retailers are at the center of it all. That's why Wal-Mart's first-quarter earnings fell 3.5% amid flat comparable-store sales in the United States. Wal-Mart management attributed most of its woes to the weather, which shaved $0.03 per share off its profits.

Costco, on the other hand, is effectively brushing off any adverse impact from the weather. Comparable-store sales, excluding the impacts from gasoline and foreign currency exchange rates, rose 6% in the United States and 8% internationally. This was even better performance than that of its previous quarter. For the three months ended on Feb. 16, Costco's same-store sales increased 5% in the United States and 7% abroad.

Costco is showing no ill effects from the weather whatsoever. Its performance is strengthening, and as the U.S. thaws out from the long winter, it stands to reason that Costco has even better days on the horizon. Another reason for optimism is that Costco isn't under the same stresses as Wal-Mart.

Costco has a much better image in the court of public opinion than Wal-Mart, based partly on the way it treats its employees and also on the condition of its stores. Aside from that, however, there are even more reasons to be concerned about Wal-Mart.

Put simply, Wal-Mart's customer base is under duress. Wal-Mart's core customer is less affluent than Costco's. In fact, Wal-Mart has estimated that roughly one-fifth of its customers are reliant on federal food assistance. And, thanks to budget cuts that have reduced payments under the Supplemental Nutrition Assistance Program, Wal-Mart's customers are pinching pennies more than ever.

Costco's key demographic generally earns a higher income than Wal-Mart shoppers do. This means an additional benefit for Costco is that its customers can keep shopping even when the economy slows down. With the economy still poor for many, and food inflation putting pressure on household incomes, Costco's customers can spend more easily than Wal-Mart's.

The Foolish bottom line
Costco has a much better image than Wal-Mart right now in terms of its employment practices, the condition of its stores, and the products on its shelves. In addition, its customers are in a better financial position. When you put it all together, it's plain to see how Costco can keep thriving even in a difficult environment for retailers.

The brutal winter weather that resulted in U.S. gross domestic product shrinking in the first quarter didn't seem to affect Costco at all. It's still reporting strong same-store sales growth in the mid- to high-single digits. Now that the harsh winter weather is finally behind us, it's likely Costco's results will strengthen throughout the remainder of the year. That's why Costco shares rose after the company reported earnings and they still have room to climb higher.