Walmart(WMT) - Get Report  could soon take quick delivery to the next level—a sure blow to Amazon(AMZN) - Get Report , which has led the shipping war for years.

In a recent interview with TheStreet about the launch of the retailer's pickup discount option, Marc Lore, president and CEO of Walmart eCommerce U.S., revealed that the company is testing same-day shipping.

"But, it [same-day delivery] comes at a cost, as last-mile delivery is very expensive," Lore said. 

A Walmart spokesman did not respond to a request for further comment.

"The company continues to trade sales for profitability as it invests in these online and store-level initiatives," said John Zolidis, director of equity research at Buckingham Research Group. "It's probably the case that the company perceives that it has no choice, given the change in consumer shopping options and behavior."

Zolidis said that in addition to the high cost of same-day delivery, having the ability to deliver the product to the customer when he or she wants it and the inventory on hand are two other challenges.

Karen Short, managing director of equity research at Barclays, told TheStreet Wednesday that if Walmart does plan to launch same-day shipping, it better make sure it nails it.

"If you don't execute on it, you'll piss off your only have one shot," Short said.

Walmart's roughly 5,000 stores across the U.S. and Puerto Rico could allow it to handle same-day shipping, plus give it an edge over Amazon, which offers next-day shipping to its Prime members, who pay a $99 annual fee for the service.

"The issue for Amazon is, Walmart has the bricks-and-mortar," Short added. "Amazon does not."

READ MORE: Amazon CEO Jeff Bezos Made One Huge Mistake That Walmart Could Make Him Pay Dearly For

On Wednesday, it was announced that beginning April 19, Walmart will give its online customers the option of having their purchases sent to a local store instead of to their homes at a discounted shipping price. Customers can still choose the retailer's free two-day home shipping service.

The Bentonville, Ark.-based company's $3.3 billion August 2016 acquisition of e-commerce company is proving to be its smartest buy to date.

Lore, who founded and now leads Walmart's U.S. e-commerce business, has mounted a serious charge against Amazon by aggressively acquiring e-commerce retailers and launching new services.

Short said Walmart is one of the only retailers to have recognized that Amazon is a threat and act on it. Many other retailers that have been forced to close massive amounts of stores and file for bankruptcy simply "sat back."