NEW YORK (CNNMoney) - Many retailers are in a world of pain because of Amazon. Walmart is not one of them.
It beat Wall Street forecasts for sales and profit on Thursday and improved its forecast for holiday shopping. The stock rose nearly 7% to an all-time high.
What's most impressive about this is that Walmart is doing it the Amazon way -- with sizzling online growth.
Walmart, which owns Jet.com, ModCloth, Bonobos, Moosejaw and several other shopping sites, said its digital sales rose a stunning 50% in the United States during the third quarter.
That's more than double the growth rate that Target just posted for online sales. It's higher than Amazon's growth rate for revenue, too.
Walmart has made a big bet on digital.
It recently bought Parcel, a logistics startup that will allow Walmart to launch same-day delivery services for online purchases in New York City.
It's working with the smart-lock company August Home on a test program that will let you order food from Walmart and have the delivery people come and put it away in your fridge.
And Jet recently launched a line of household products targeted at millennial shoppers called Uniquely J.
Walmart also revamped its return policy to make it easier and faster for customers to start the return process using the Walmart app.
And Walmart is taking a page from Amazon's book by selling other retailers' products on its own site. Walmart recently announced that it will sell clothes from Lord & Taylor.
The company is thriving in China as well. Sales from Walmart and Sam's club locations there are solid, and online growth is robust thanks to a partnership with the Chinese e-commerce firm JD.com, the top rival to Alibaba.
This and other initiatives are helping boost traffic and sales at Walmart's physical stores, not just its digital sites. And Wall Street has noticed.
Shares of Walmart are up 35% this year, while other big retailers like Target, JCPenney, Macy's and Sears have plunged.
It seems investors and shoppers alike are increasingly viewing the online mass-merchandise battle as one with two winners -- Walmart and Amazon -- and many losers. Amazon's stock has soared more than 50% this year.
Walmart is also holding its own in the supermarket business, posting solid sales growth, particularly online. That's despite an increased threat from Amazon, which now owns Whole Foods and has been cutting that chain's prices.
There may be room for some other specialty retailers to thrive.
Best Buy disappointed Wall Street on Thursday with sales that missed forecasts and a tepid outlook, but its stock is still up 30% this year.
Home Depot is benefiting from the housing boom, partly because homebuilders and do-it-yourself customers want to see its products in a brick-and-mortar store. Kiddie apparel company Children's Place has enjoyed solid sales, too.