When it comes to lettuce and deli meats, cheap goes a long way. And if there's one grocer that really gets it, it's Walmart.

Walmart Stores Inc. (WMT) - Get Report reported a five-year peak in quarterly comp sales for its grocery business on Thursday, Aug. 17, thanks to its budget-conscious prices and the rollout of its e-commerce grocery platform.

"The grocery business continued to improve as food categories delivered the strongest quarterly comp sales performance in five years," CEO Doug McMillon said in the second quarter earnings call Thursday morning.

The high sales, according to CFO Brett Biggs, can be attributed to strong customer traffic and slight market inflation, he said in an earnings statement.

Walmart sells the cheapest foods compared to Amazon.com Inc. (AMZN) - Get Report , Target Corp. (TGT) - Get Report and Kroger Co. (KR) - Get Report , according to a June study from Charles Grom analyst Gordon Haskett. But Walmart faces more competition from the expansion of German discount grocers ALDI and Lidl, whose aggressively low prices have already pushed Walmart, reportedly, to sell below cost.

Walmart, however, is not too concerned, according to Steven Schmitt, a vice president.

"We're certainly monitoring their results in the markets very closely," he said of the hard discount chains. But, he added, "We think we know for the most part what their game plan is, we like our plan and we'll continue to make progress with the customer."

Image placeholder title

Walmart fixes its eye on the prize of expanding the online grocery program to 1,100 locations by the end of the year.

"The expansion rate we have today is actually pretty aggressive and the amount of work and training to make sure customers get the right experience," said Schmitt. "We're happy with that, but we certainly be looking to do more. Overall, we're pretty pleased."

The e-commerce grocery program currently has 900 locations.

This quarter, Walmart exceeded Wall Street estimates with earnings of $1.08 per share and a 2.1% rise in revenue to $123.4 billion. 

Walmart's high performance is more bad news for Kroger, still recovering from its 19% stock plummet earlier this summer, in the wake of diminishing profit margins.

More of What's Trending on TheStreet: