With all that, it would be completely unsurprising to find out that Amazon runs their warehouse and goods movement more efficiently than Walmart does, but they still don't own the entire stack like Walmart does.
On top of that, Walmart gets companies to produce entire product lines at prices that they themselves pretty much set. Amazon is just going to take a cut of a lot of sales while Walmart is getting the margin they want.
Technology wise I'd say it's a safe bet that Amazon is light years ahead, but don't sleep on Walmart Labs and their ability to innovate. Just don't expect it to be as useful to us as AWS.
I know everyone likes to bag on Walmart for being 'cheap' and/or 'shit' but at least if I buy a brand from Walmart I can be extremely confident in it being the real thing. Which has been getting to be (at least personally) a huge issue with me for Amazon and has started moving me to buy more things at other stores (including Walmart).
There are tradeoffs between the two, but I think they both run tight ships and are in the best position to be each other's biggest competitor.