Both companies are leaders within their own markets. Amazon (AMZN -1.65%) is the king of e-commerce, while Dollar General (DG -0.36%) is the powerhouse among dollar stores. Each outfit can -- and does -- perform in almost any economic environment, and both stocks have rewarded patient shareholders.

If there's only room for one of these picks in your portfolio right now, however, it's Amazon. Here's why.

Meet the contestants

Amazon needs no introduction. Digital Commerce 360 estimates the company controls around 40% of the United States' online-shopping market, while Canalys says Amazon Web Services remains the cloud computing market leader as measured by revenue. Last year's top line of $386 billion qualifies Amazon as one of the biggest companies in the world, as does its $1.5 trillion market cap.

Woman standing on sidewalk choosing between two options marked with chalk arrows.

Image source: Getty Images.

Dollar General is considerably smaller. The 17,000-store chain's revenue through the first three quarters of fiscal 2020 is up 23% year over year thanks to a pandemic boost, but even so, the retailer's top line over the past four reported quarters is a modest $32.5 billion.

Investing is a relative business, however. A stock's gains or losses reflect how well an organization is performing compared to its past, and/or how well it's likely to perform in the future relative to its perceived potential.

Dollar General has done very well relative to its past. Its foreseeable future, however, can't hold a candle to Amazon's expected growth.

Amazon plays good offense and defense

Ever heard the cliche about how the word "crisis" in Chinese means "dangerous opportunity"? It's not an accurate translation, but the point is clear: Crises like the COVID-19 pandemic can be dangerous for companies, but if handled wisely, they're also opportunities for growth.

It's arguable no other organization benefited more from the coronavirus contagion than Amazon -- not because of what it did in the midst of it, but because of how it used the situation to solidify its growth into the future.

For example, in June of last year, Amazon expanded its cloud computing capabilities to better serve the military and civilian orbital satellite market. It's also moving forward with its physical grocery footprint, opening its first Fresh grocery store in August and its second in October. The pandemic is still going pretty strong, but now there are eight of these stores up and running despite the complications of managing a brick-and-mortar operation while the coronavirus is still dominating headlines. Perhaps most important, according to Consumer Intelligence Research Partners LLP (CIRP), Amazon Prime now boasts 142 million subscribers in the U.S. alone, up from 112 million a year earlier.

This last detail seems as problematic as it does intuitive. Consumers needed a cost-effective way of shopping online from home when the pandemic was raging, and Prime offered such a solution. But, as COVID-19 abates, some believe these subscribers will have less of a reason to remain on board.

That stance looks past a curious nuance of how people are utilizing their subscriptions, however. As it turns out, many of them like it for more than just free two-day shipping. Reelgood data indicates Prime accounts for around one-fifth of U.S. consumers' time spent streaming video in the last three quarters of last year, second only to Netflix. To put that in perspective, in 2020, people watched more Prime programming than Walt Disney's Disney+ or Hulu programming. They may decide to stick with Prime even once the pandemic is in the past, given its added perk of cheap online shipping. It matters simply because people who are paying for Prime reportedly spend more than twice as much money at Amazon than non-Prime shoppers do.

End result? Analysts expect Amazon's top line to grow 23% this year and then another 17% next year, pumping up per-share profits from 2020's rate of $41.86 to $66.14 in 2022.

Dollar General's initiatives aren't as lucrative

None of this is to suggest Dollar General isn't maneuvering to add customer relationships and then cement them in place. For example, the retailer rapidly expanded the pilot of its BOPIS (buy online, pickup in-store) program in response to COVID-19. It also continued to add fresh groceries at select stores last year, with another 600 locations scheduled to start selling perishables this year, up from around 1,000 right now. These are all smart moves.

Dollar General's got a tough 2020 act to follow, though. And for this particular company, analysts are modeling sales growth of only 1% this year, paired with a slight pullback in per-share earnings.

Don't dismiss the disparity. Investor excitement can be a key factor in a stock's performance. This dollar store chain isn't generating the same levels of excitement among investors as Amazon. And there is every indication that Amazon has plenty more investor enthusiasm firepower to tap into in the year ahead.