Doughnuts or bananas? Both can be pretty sweet, actually.

Samsung Electronics (NASDAQOTH: SSNLF) is the Korean poster boy for consumer electronics, deeply involved in every corner of that market. Micron Technology (NASDAQ:MU) battles Samsung head-to-head in the memory chip sector -- and that's all.

So we're looking at two very different companies here, even though they are direct rivals in one important market. Which stock is the better fit for your own investment portfolio?

Before we get started

Let's just clear up one important detail right here. No, Samsung shares are not trading on any of the major American stock markets. The stock is issued on the Korean stock exchange, Korea Exchange, with proper global depositary receipts available on the London and Luxembourg exchanges. The "global" bit of that moniker is somewhat misleading, since U.S. residents are explicitly forbidden from trading these papers.

But you can still own Samsung shares. Two American banks have the right to buy and sell Samsung shares directly on the Korean market, on behalf of their customers. Or you can drop down to the over-the-counter or Pink Sheets markets to grab a variety of not-quite-authoritative Samsung shares. These alternative shares tend to follow the official stock in the long run, but it's not a perfect fit and you may miss out on some important shareholder rights. Find out more on Samsung's investor relations pages.

Oh, and Micron's headquarters can be found in Boise, Idaho. That's about 670 miles away from Silicon Valley. It's a two-letter ticker, trading on the traditionally four-letter Nasdaq Stock Market. I think that covers Micron's deepest mysteries.

By the numbers

Both companies are running into a changing environment for consumer technologies.

Samsung's annual sales fell 2.6% in 2015, and net profits declined by 18.5%. For Micron, revenue slid 1% lower, and diluted earnings fell 2.8%.

Both companies pointed to weak demand from a handful of end-user markets. In particular, mobile-device growth is taking a global breather. On the other hand, enterprises are getting into solid-state drives in a big way, which helps the memory makers prop up their revenue flows until the consumers come around again.

That just about explains Micron's current situation. However, memory chips account for just 17% of Samsung's annual sales. Mobile devices serve as the company's largest division, showing single-digit sales declines in 2015. Here, management is looking for a single-digit rebound in 2016.

The Samsung Galaxy S7 Edge handset, an important piece of the Korean company's current business. Image source: Samsung.

Digging deeper

So neither Micron nor Samsung are showing any signs of massive growth prospects these days. Micron's play on economies of scale has largely played out already, so the company must now simply out-execute the competition. Samsung's mobile growth is stalling, along with the rest of that former hypergrowth market.

Samsung is the far larger business here, and its operations are more diverse. Unfortunately, the largest end market in Samsung's sights does not seem due for any massive growth spurts any time soon. The upcoming fifth-generation wireless rollouts may prove me wrong, but even that expected growth driver is still several years away.

For Micron, the path back to steady growth runs through the PC and server markets. Mobile growth would be nice for Micron too, but the company isn't betting on it as heavily as Samsung is. This is not necessarily an easier road, but solid-state drives should lead the way for at least a couple more years. The traditional hard-drive builders are shaking in their boots over this revolution and doing their best to adapt to this new reality. Micron and Samsung sit on the other end of that equation.

So which stock should I own?

Personally, I already own Micron shares. That position was built in 2013, as the game-changing Elpida buyout inched toward completion. But the original investment thesis has run its course. In retrospect, I could have sold at the end of 2014 for a nifty sixfold gain. Share prices have retreated by a hair-raising 64% from those highs.

That makes Micron a deeply discounted value stock in my view. I'm not saying that the stock incontrovertibly belongs north of $35 per share, or that the PC market is due for another kick-start. But the stock is trading right at Micron's current book value, which means that market makers think that investors would pretty much break even if the company just sold off its assets and got out of doing business.

That is an unreasonable conclusion, and a signpost on the road to renewed share price growth. Even if the business just holds steady at its current cash flows and returns on equity, its valuation multiples should rise higher.

Samsung is in a very similar boat, with price-to-book values just above 1.0. It's also a far more profitable business, with much deeper pockets in case the market drought sticks around for several years. Everything I said about Micron also applies to Samsung, and perhaps to an even greater degree.

I think we have two winners here. I'll simply stick with my existing Micron position for now, but new money could just as easily get into Samsung at these bargain-bin prices.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.