Chinese e-commerce giants Alibaba (NYSE:BABA) and JD.com (NASDAQ:JD) are direct plays on economic growth in the Middle Kingdom. Both companies tap into the local consumer culture on an epic scale, placing them among the largest companies in the world.

But which stock is a better fit for your portfolio? Is it direct-to-consumer JD or is it e-commerce back-end specialist Alibaba? Let's have a look.

By the numbers

JD and Alibaba are very similar in some respects -- but only at first glance.

For example, both companies have been growing their sales at a breakneck speed over the past five years:

BABA Revenue (TTM) Chart

BABA Revenue (TTM) data by https://ycharts.com">YCharts

...but the comparison looks very different when viewed from a percentage-based point of view:

BABA Revenue (TTM) Chart

BABA Revenue (TTM) data by https://ycharts.com">YCharts

JD's free cash flows look a bit less predictable than Alibaba's in the short term, but both have doubled or tripled their cash profits in five years:

BABA Free Cash Flow Chart

BABA Free Cash Flow data by https://ycharts.com">YCharts

Oh, but Alibaba runs a cash machine on a whole different scale than JD's:

BABA Free Cash Flow Chart

BABA Free Cash Flow data by https://ycharts.com">YCharts

In my opinion, the biggest takeaway from these charts is that Alibaba's nearly inventory-free business model generates much more cash than JD's more direct stock-and-ship focus. Over the past four quarters, Alibaba converted a whopping 41% of its revenues into free cash. JD's cash margin stopped at just 3%.

Business trends

JD's slim profit margins give the company a huge opportunity. It doesn't take much of a change to those paper-thin margins to drive a big difference in the company's total earnings and cash flows. This has been a core focus for JD in recent years, and you should expect the company to continue its quest for wider profit margins:

JD Operating Margin (TTM) Chart

JD Operating Margin (TTM) data by https://ycharts.com">YCharts

Alibaba is less concerned with margin expansion and more interested in maximum revenue growth. Management wants to achieve a cool $1 trillion of gross merchandise volume streaming through the Alibaba e-commerce machinery in fiscal year 2020, ending on March 31. That would be up from $810 billion in 2019, and that goal seems reachable in the coronavirus world where shoppers around the world -- including China -- rely on online orders like never before.

Close-up photo of the hands of two businessmen engaged in arm wrestling.

Image source: Getty Images.

And the winner is...

Buying share in JD means that you expect the company to widen its profit margins over time. That's where the money is. An Alibaba investment is a more direct bet on continued top-line growth. There's a place for both of these strategies but Alibaba's fast-growing sales and hyper-efficient cash conversion strike me as a more robust business model than JD's less-predictable margin play. This is the kind of stock you can stick under your pillow and sleep soundly for many years, while JD.com would make you check on your holdings more often.

Both stocks look good in a certain slant of light but I would much rather own Alibaba in the long run.