The PC market isn't growing like it was a few decades ago, but that hasn't been a problem for semiconductor companies, which have experienced rising demand for chips across various industries. The Philadelphia Semiconductor Index is up 123% over the last three years, which handily beats the S&P 500 index return of 48%. 

Leading graphics processing unit (GPU) maker NVIDIA (NASDAQ:NVDA) has seen its shares rocket more than 1,000% over that time, while Cypress Semiconductor's (NASDAQ:CY) shares are up 53%. But which stock should investors bet on from here?

Let's take a look.

Key numbers

Metric NVIDIA Change (YOY) Cypress Change (YOY)
Market cap $165.94 63% $5.57 18%
Revenue (TTM) $11.88 32.32% $2.41 3.47%
Net income (TTM) $4.302 41.19% $0.246 NA
Free cash flow (TTM) $4.141 57.03% $0.420 20.26%
Dividend yield 0.22% NA 2.86% NA
Forward P/E 34.27 NA 11.59 NA

Data source: Y-Charts. All dollar amounts in billions. YOY = year over year. TTM = trailing twelve months.

What do these companies do?

NVIDIA is the pioneer of the stand-alone graphics card, which it first launched in 1999. Today, it commands about two-thirds share of the discrete graphics card market. 

The company has made a name for itself over the years by selling graphics cards to PC gamers. It also has a history of making graphics cards for consoles, such as a custom Tegra processor it's currently supplying for the Nintendo Switch. 

NVIDIA graphics processing unit

NVIDIA GeForce RTX 2080 Ti GPU. IMAGE SOURCE: NVIDIA.

Over the last few years, NVIDIA has found new applications for its core graphics technology in the fast-growing data center market. Additionally, its DRIVE PX chip for self-driving cars has led to partnerships with some of the world's leading consumer and industrial car makers. 

As for Cypress, it's the market leader in several fast-growing markets, including Wi-Fi and Bluetooth chips for Internet of Things (IoT) applications, auto instrument controllers, auto NOR flash memory, touchscreen controllers, and USB-C controllers. It's also a leading provider of SRAM memory. 

For a long time, Cypress was wedded to a declining SRAM memory chip market while trying to grow its USB and PSoC (programmable system on a chip) business. The acquisitions of Spansion in 2015 and Broadcom's wireless connectivity business in 2016 expanded Cypress's reach into the automotive and IoT industries, which has changed its fortunes for the better. 

How are NVIDIA and Cypress performing now?

NVIDIA has seen robust demand for GPUs across gaming and data centers over the last few years. Revenue has more than doubled from $5 billion in fiscal 2016 to $11.9 billion over the last 12 months. Across gaming, data centers, and the automotive market, NVIDIA anticipates its total addressable market to be well over $100 billion. 

On top of strong demand for the company's GPU products, management has kept a tight lid on operating costs, which, along with a favorable sales mix shift to higher-priced GPUs, has pushed NVIDIA's margins up. These factors have allowed earnings per share to climb 534% since fiscal 2016. 

The most recent quarter showed NVIDIA continuing to fire on all cylinders. Wall Street expects revenue to surge another 33.9% this year, while earnings are expected to grow 51% to $7.30 per share. 

Cypress' performance hasn't been too shabby either. Cypress is in a good position to serve the auto market, as demand for chips increases and cars become more complex and computerized. Similar trends are occurring in IoT, where everything from drones and smart home devices to infotainment systems in cars is driving demand for Cypress's wireless chips. These markets were primarily responsible for boosting revenue 21% last year. 

Cypress has an enormous market to tackle. Across automotive, IoT, and industrial applications for its chips, Cypress has an addressable market that approaches $100 billion. Management anticipates revenue growing 7% to 9% per year through 2021. 

Management has also been focused on reducing costs and realizing synergies from acquisitions to expand margins. Cypress hasn't reported a profit over the last few years, but the chipmaker generated free cash flow of $349 million in 2017 -- a big improvement over the negative cash flow generated in 2015. Wall Street expects revenue to grow 8.6% this year, while non-GAAP earnings are expected to jump 50%. 

Which is the better buy?

NVIDIA is growing much faster than Cypress right now, which is reflected in both stocks' respective valuations. NVIDIA shares are much more expensive, trading at a forward P/E of 34 times, while Cypress trades at a cheaper multiple of only 11 times forward earnings estimates. 

As an NVIDIA shareholder, I like NVIDIA's competitive position as the market share leader in the discrete GPU market, but a few headwinds could cause some hiccups over the next couple of years. 

The graphics maker should be able to keep its gaming momentum going through the end of the year with its new 20-series RTX GPUs. However, its main rival, Advanced Micro Devices, has managed to gain some market share on NVIDIA over the last year. With AMD planning to launch a 7 nanometer chip next year, it could continue nipping at NVIDIA's heels. 

There's also longer-term uncertainty about what kind of threat Intel might present with its plans to develop its own discrete graphics card by 2020. 

I'm confident NVIDIA can weather these challenges. But still, we're deciding whether to pay 34 times forward earnings for NVIDIA or pay 11 times forward earnings for Cypress, which has an equally huge growth opportunity over the long term.

Cypress is gaining share in the markets it serves. It seems to be a great way to play the increasing computerization of cars and the growing adoption of wearables and smart home devices, in which Cypress has supplied chips for Amazon.com's Echo, among other hot products. 

Considering a generous forward dividend yield of 2.7% alongside its cheap valuation, I believe Cypress Semiconductor is the better buy for investors today. 

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. John Ballard owns shares of Nvidia. The Motley Fool owns shares of and recommends Amazon and Nvidia. The Motley Fool recommends Broadcom Ltd and Cypress Semiconductor. The Motley Fool has a disclosure policy.