Image source: Getty Images.

It's the classic story of David versus Goliath. Or, it used to be -- but things have been changing lately. Advanced Micro Devices (AMD -0.35%) and Intel (INTC 0.64%) aren't the unambiguous head-to-head rivals they used to be.

So, what's new in this storied matchup, and which stock should you buy today?

Let's find out.

The AMD story

If you're looking for massive market momentum, there is no contest, here. Intel has traded roughly in line with the S&P 500 over the last year, but AMD shares have tripled year to date and nearly quadrupled over the last 52 weeks.

Image source: AMD.

Of course, AMD started that climb from a deep, dark well.

Six years ago, AMD shares traded at $7.50 per share. The next five years saw AMD sliding 70% lower, landing at $2.22 in November, 2015. Revenues were plunging and the company was burning enormous amounts of cash. Weak PC sales and a soft market for video game consoles added up to bad news for AMD investors.

By 2015, it was not obvious that AMD would avoid a bankruptcy in the long run.

After a false start based on unproven buyout rumors, AMD started a real comeback in January. A solid fourth-quarter report was followed by three positive earnings surprises. The company launched an all-new graphics chip architecture to wide acclaim, and investors are looking forward to an equally radical redesign of AMD's PC processor cores in early 2017.

Once left for dead, AMD now looks like a vital business with a serious shot at revenue growth and steady profits. That's how the stock reached today's high levels.

From here, even the bulls think the stock looks fairly valued. Buy ratings are based on future revenue growth, not expanding valuation ratios. The upcoming launch of the Zen processor architecture will be a make-or-break moment for AMD. The company did a good job with the Polaris graphics platform, which improves the odds for a decent Zen introduction.

Still, AMD remains a risky bet until the company can get a truly solid financial footing again. Zen is going up against Intel's best server and desktop chips, and that's always a daunting challenge. At this point, I'm happy to stay on the sidelines and wait for the Zen introduction. Makes no sense to make a blind bet on a dark horse, after all.

The Intel story

If 2016 was a year of transition for AMD, the same was also true for Intel.

The chip giant reduced its headcount by 11% this year, then installed a new CFO and decided to spin off its security operations under the McAfee brand. Intel continued to exceed earnings estimates at every beat, but gloomy guidance led to a dramatic haircut in January.

Image source: Intel.

However, Intel is a far larger and more stable business than AMD. The last four quarters generated $10.5 billion of free cash flows, even though Intel is ramping up its capital expenses again. This company has the financial freedom to take chances and try out new markets without betting the entire farm.

The revamped strategy points to data center servers and the Internet of Things. The traditional PC market will continue to shrink, but Intel is making up for that drag with improvements in those two core markets.

Would I add more Intel shares to my existing holdings at today's prices? Maybe not. The stock is riding relatively high at the moment, just short of the multiyear highs Intel reached in October. For the moment, I'm happy to stick with the shares I already own.

That being said, I just might take another dip into Intel shares the next time this high-quality stock takes a sharp fall for no good reason. It happens more often than you'd think.

The high-stakes gamblers out there might want to take a deeper look at AMD. For the rest of us, Intel is the lower-risk way to go.