Any technology investor who has followed the semiconductor industry even remotely closely will know that there can be a lot of volatility because of product cycles. But you wouldn't know it by looking at Cypress Semiconductor's (CY) and Advanced Micro Devices' (AMD -0.98%) stock prices. Cypress' share price is up more than 40% over the past 12 months and AMD's price has skyrocketed a staggering 200% -- and both increases have easily beat the market's gain of 15%.

But past performance, of course, isn't an indicator of future gains. So let's take a peek at how these companies are growing and what advantage (if any) they have in their respective markets, to see which may be the better long-term buy.

A microchip being placed on a motherboard with tweezers.

Image source: Getty Images.

A closer look at AMD

AMD has often stood in the shadow of graphics processor rival NVIDIA (NVDA -0.62%). NVIDIA holds the majority of the discrete desktop GPU market -- at about 70.5% right now -- and AMD takes up the rest. But AMD has made some solid advances against NVIDIA over the past few years, and its nearly 30% discrete desktop GPU market share is up from just over 20% last year. 

Investors have been pleased with those gains and the fact that AMD continues to be the go-to supplier for Sony's and Microsoft's semi-custom chips for gaming consoles. A recent Morningstar investor note form Abhinav Davuluri said that new design wins from Microsoft for its upcoming console could help AMD's semi-custom segment grow by low double digits over the next several years.

The company recently reported earnings for its 2017 first quarter, in which revenue grew 18% year over year, to $984 million. Most of those gains came from AMD's computing and graphics segment sales, which were up 29% year over year. But it wasn't all good news for the company: Computing and graphics posted a loss of $15 million in the quarter, marking 12 consecutive quarters of losses for that segment. 

And then there's AMD's current valuation. AMD shares are trading at a forward P/E of more than 37 right now, compared to the tech industry average of about 25. The ongoing losses in one of the chipmaker's most important business segments is going to make it difficult for the company to match its current valuation and be a solid long-term play as it stands right now. 

AMD Chart

AMD chart by YCharts.

A closer look at Cypress Semiconductor 

Cypress has a broad semiconductor business that encompasses everything from memory chips to automotive instrument cluster processors to Internet of Things (IoT) connectivity. Cypress' position in the embedded-chips space is strong and its most recent quarterly earnings showed the company's slow yet steady growth.

Total sales grew by 26.9% year over year, to $531.9 million. Automotive sales ticked up 6% sequentially, and wireless connectivity jumped 30% from the previous quarter. Cypress also posted a net income loss of $45.8 million in the quarter, but on a non-GAAP basis (taking out stock-based compensation and acquisition costs) net income increased nearly 100%, to $45.9 million. 

Cypress stock is trading at just 13 times its forward earnings, far below the tech average of 25. Investors looking for a strong bet on embedded semiconductors would be smart to give Cypress consideration. The company has its hands in multiple areas of embedded systems and wireless connectivity, which gives it lots of opportunities as enterprise customers are projected to spend $1.29 trillion on the Internet of Things by 2020.  

CY Chart

CY chart by YCharts.

The quick takeaway

I like AMD's growth and strong position in the graphics processor space, but I think the company may be overvalued right now as investors have pushed up its share price faster than it can offset losses in one of its core segments. Meanwhile, Cypress is dealing with its own net losses, but continues to grow revenues across key businesses, has acquired companies to expand its semiconductor footprint, and trades at a much lower valuation. Thus, I think Cypress is a better pick over AMD right now.