Given the economic slowdown and cut-throat competition in today's retail environment, companies like Costco Wholesale (NASDAQ:COST), Wal-Mart (NYSE:WMT), and PriceSmart (NASDAQ:PSMT) are trying their best to nibble away at each other's customer bases. Among these big retailers, Costco is one company that has successfully stood against all odds and seems to be moving in the right direction. 

Third-quarter results
Costco recently released its third-quarter results and they showed improvements in both earnings and revenue from the year-ago quarter. However, the company's earnings fell slightly short of expectations due to the negative impact of currency fluctuations and lower gasoline prices. The company earned $1.07 per share, compared to $1.04 a share in the same period a year earlier. Similarly, revenue grew 7% year-over-year to $25.23 billion. Analysts polled by Thomson Reuters had expected earnings of $1.09 per share and $25.76 billion in revenue.

As a result of new store openings, the company experienced increases of 7% and 8% in merchandise and SG&A expenses, respectively.

Apart from reporting healthy third-quarter results, Costco also posted strong results for the month of May. The warehouse club generated $8.78 billion in sales, an increase of 8% from the same period in 2013.

What's cooking at Costco?
Costco began its recent stock repurchasing activities on March 7. Since then, the company has bought 1.6 million shares at an average price of $113.14. In other words, it spent $183.6 million during these nine weeks. Last month, the retailer also increased its quarterly dividend from $0.31 per share to $0.355 per share.

The retailer is continuously expanding as it expects its new stores to keep capturing sizable market share worldwide. In the third quarter, the company opened 20 units and it will add 10 new locations in the fourth quarter.

In order to capitalize on growing online business, Costco is investing heavily in e-commerce channels. It is replatforming its online sites and is adding mobile apps to enhance customer experiences. Moreover, to improve shipment timing for some bigger ticket items, it has started to ship out of more than one depot.

Costco has also collaborated with Google to bring Google Shopping Express to various cities. The service, which provides same-day delivery to customers, is currently undergoing tests at Costco's Culver City location in Los Angeles and its Manhattan location in New York City. To increase its membership signups, Costco has also partnered with social media groups such as LivingSocial and Zulily.

Industry peers
The world's largest retailer, Wal-Mart, posted stale figures in its most recent quarter as it missed analysts' estimates on both earnings and revenue. The company booked EPS of $1.11, down from $1.14 per share in the year-ago period. Overall sales came in at $114.96 billion, below analysts' expectations of $116.27 billion. The retailer attributed the declines in earnings and revenue to brutal weather conditions on its home turf. However, to make up for lost sales at its Supercenters, the company is growing its small format stores and investing in e-commerce. The retailer expects these expansionary moves to help it grow in the future.

During its latest quarter, PriceSmart's earnings rose 13.5% to $0.93 per share, up from $0.82 per share in the comparable period last year. Total sales also jumped to $674.4 million from $607.4 million in the year-ago quarter. However, on the comparable-sales front, the company posted disappointing results. Comps dropped to 2.3% in May from 4.6% in April. In fact, the company's identical-store sales have been declining for the last eight months, which is a worrying sign for the company.

Final thoughts
Costco posted healthy third-quarter results as its earnings and revenue kept growing. Had foreign exchange rates and gasoline prices remained stable, the retailer would have beaten its earnings expectations. The company's sales report for the month of May clearly shows that it's still attracting a lot of shoppers. On top of this, an increase of 14.5% in its quarterly dividend reflects Costco's confidence about its performance in coming years. For this reason, it's also expanding its stores globally. Besides this, the retailer's partnership with Google for Google Express Shopping will prove fruitful, as the service has already grabbed the attention of a lot of customers. Considering all of this, Costco looks to be a judicious investment choice at this point in time.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.