E-commerce has been one of the most exciting growth spaces for investors over the last generation, and it's easy to see why. As technology and delivery infrastructure continue to improve, online shopping will only become easier and more convenient for consumers around the world, taking an even greater share of the approximately $25 trillion global retail market. 

In the U.S. and in much of the rest of the world, no company has been more responsible for accelerating this transition than Amazon (NASDAQ:AMZN), which has blanketed the country with warehouses and recently announced that more than 10 million items are now available for free one-day shipping for Prime members.

A box sitting on a doorstep.

Image source: Getty Images.

However, savvy investors know that Amazon isn't the only e-commerce option out there. MercadoLibre (NASDAQ:MELI) has exploded across Latin America, its marketplace and payment network capturing a significant opportunity south of the border. 

Both stocks have delivered huge returns over the last five years, as the chart below shows, besting the S&P 500 by more than 10 times.

MELI Chart

MELI data by YCharts

While both stocks are clearly appealing to own, investors may have a hard time choosing between the two. Let's take a look at what each one has to offer before determining which is the better buy today.

A leader in an emerging market

As an e-commerce company, MercadoLibre functions more like eBay than like Amazon. eBay was even an early investor in the platform, and the company recently received a $750 million investment from Paypal, a former eBay subsidiary. 

Unlike Amazon, MercadoLibre does not do direct selling, operating only as an e-commerce marketplace and a payment platform. In fact, the recent tie-up with Paypal may be a signal as to where MercadoLibre's headed.

In its first quarter, revenue surged 92.9% in currency-neutral terms to $473.8 million, but the main driver of that growth wasn't its marketplace business but its MercadoPago payment platform, which is used both on MercadoLibre and elsewhere. Total payment volume jumped 82.5% in constant currency to $5.6 billion, easily topping gross merchandise volume, which increased 26.6% in constant currency to $3.1 billion in the period.

In recent years the company has invested in expanding its payment technology with initiatives like its mobile point-of-sale device, MercadoPago Point, which allows merchants to accept credit or debit cards or even take payments in installments. MercadoPago Point has been a key driver of off-platform payment volume, which nearly tripled on a currency-neutral basis in the most recent quarter. 

Like many fast-growing companies, MercadoLibre is only borderline profitable. It lost $36.6 million last year, but made a profit of $11.9 million in its first quarter, or $0.13 per share. However, as companies like eBay and Paypal have shown, online marketplaces and payment platforms can be highly profitable businesses at scale, so investors should have similar expectations for MercadoLibre over the long term as it matures.

The e-commerce gorilla

Ever changing, Amazon today is much more than an e-commerce company. While the company continues to make investments and changes to its core platform, such as by offering one-day delivery to Prime members and favoring its marketplace over its direct-selling platform, Amazon is also investing in areas far afield from e-commerce, including cloud computing with Amazon Web Services, voice-activated technology through Alexa, and even healthcare with its acquisition of PillPack and its joint venture with Berkshire Hathaway and JPMorgan Chase.

The upshot of those investments and Amazon's network of competitive advantages is a company quickly shifting from revenue growth to profit growth. AWS, for instance, has become a profit machine, posting $7.3 billion in operating profit last year. Meanwhile, the company's e-commerce business has emerged as a profit center, at least in North America, as it's leveraged its warehouses and popular shopping platform into a high-margin marketplace and fulfillment business and a $10 billion advertising business, which is now the No. 3 digital advertising company (behind Google and Facebook). As a result, profits surged last year from $3 billion to $10.1 billion, and that pattern has continued into the first quarter. 

Looking ahead, the company will need to continue expanding its profit margins, as revenue growth will only get more difficult since Amazon is already one of the biggest companies in the world by sales, with $233 billion in revenue last year. However, AWS, advertising, and the company's increasing emphasis on its marketplace should help the bottom line grow, while experiments in healthcare, supermarkets, and new technologies give investors reason to believe that the growth story is far from over. 

Who wins this e-commerce duel?

It's easy to see why both Amazon and MercadoLibre have been big winners on the market. Each has built a network of competitive advantages and leading positions in its market that makes it difficult to unseat.

From an investor perspective, the most crucial difference between these two companies may be where they are in their respective life cycles. Amazon is now a behemoth, one of the most valuable companies in the world at a market cap of $850 billion. That means the stock is unlikely to triple or even double from here as long-term investors have become accustomed to. MercadoLibre, on the other hand, has a much smaller market cap of $27.6 billion, meaning the company has a much greater runway to grow by multiples, especially considering the long-term opportunity in e-commerce and payments in Latin America.

Therefore, MercadoLibre looks like the better choice for growth investors. Amazon may actually be a safer investment for risk-averse investors, considering its market power and competitive advantages, although high expectations are still baked into the stock price. Still, Amazon seems the less likely of the two stocks to suffer a collapse should a recession or other unexpected challenge strike.