Sales at Walmart’s U.S. stores rose nearly 5% in its most recent quarter, a better-than-expected result that suggests shoppers squeezed by inflation and wary of economic uncertainty continue to flock to the retailer for staples and other goods, the company said Thursday.

As the largest retailer in the United States, Walmart is considered a bellwether for how consumers are feeling about the economy. Recent results from rivals have been mixed, but Walmart’s earnings were relatively upbeat, showing sales “momentum,” according to CEO Doug McMillon.

The number of shoppers who visited Walmart was up 1.5% in the quarter ending in July from the year before, and the amount of time they spent per visit grew twice as fast. The company’s e-commerce sales jumped more than 25% over the previous year.

See Full Page