Image source: Getty Images.

It's been a rough ride for InvenSense (NYSE:INVN) investors over the past few years. There's no getting around that. The company's micro-electro-mechanical sensors (MEMS) that track movement in smartphones and Internet of Things devices seemed like a good bet for a while, but the company has failed to make big gains from its core MEMS business. 

InvenSense posted revenues of just $79.8 million in the fiscal second quarter 2016, down 29% year over year. And the company's stock price hasn't been immune to InvenSense's poor business performance. The stock price is down around 33% over the past 12 months.

Image source: YCharts.  

For investors who still want to put their money in the technology sector -- but are looking beyond InvenSense -- NVIDIA (NASDAQ:NVDA) and STMicroelectronics NV (NYSE:STM) are worth taking a hard look at. Let's find out why.

NVIDIA is building out all of its core segments

First things first: NVIDIA isn't the same type of company as InvenSense. The company makes graphics processing unit (GPU) chips for gaming, data centers, automobiles, and other uses. 

But NVIDIA is a prime example of a tech company that's growing its core business while expanding its other segments as well. The company made about 62% of its total revenue in fiscal Q3 2017 from its gaming segment (selling GPUs for gaming purposes), which was an increase of 63% year over year. The company's been able to grow its key business by continuing to release high-end GPU technology (it released a series of new graphics cards and new chip architecture this year) that's kept it ahead of its competitors. 

But NVIDIA is also succeeding with its other businesses as well. In fiscal Q3 2017, the company nearly tripled revenue in its data center business on a year-over-year basis. It also increased its automotive segment revenue by 61% year over year, and its third-largest business -- professional visualization -- grew by 9%.

This growth, along with previous strong quarters, has earned the confidence of investors and has pushed NVIDIA's stock price up around 205% over the past year. 

Image source: YCharts..

A similar MEMS play

For investors looking for a similar tech play to InvenSense but with better growth opportunities, STMicroelectronics might be worth a look. The company makes MEMS just like InvenSense, but it has handled the market much better.

STMicro competes directly with InvenSense, and both have fought for spots in Apple's devices (InvenSense's tech is currently in the new iPhone 7, while STMicro's sensor won a spot in the Apple Watch). There are rumors that InvenSense is putting itself up for sale, and STMicro could be a potential buyer.

But for now, the company has been busy bouncing back from some soft quarters and seeing slow, but steady, growth. In the third quarter, STMicro reported revenue of $1.8 billion, up just under 2% year over year.

That's not all that impressive of course, but the company has been busy snatching up other businesses to improve its prospects. In the third quarter, it acquired near-field communication (NFC) and radio frequency ID (RFID) assets to expand its mobile and Internet of Things MEMS opportunities. 

STMicro is also doing a good job expanding its gross margins as well. Margins rose to 35.8% in the third quarter, up from 34.8% a year ago, and the company says it's on track to reach 37% in the fourth quarter.

As opposed to InvenSense, STMicroelectronics investors have seen what the company is doing and have responded positively. The company's stock has spiked 35% over the past 12 months.

Image source: YCharts.

InvenSense could be the target of a possible acquisition and it's currently failing to grow its core MEMS business. Those two things alone will cause some instability for the company going forward, no matter what other opportunities lie ahead for InvenSense. 

Instead of waiting for a possible turnaround (that I'm skeptical of seeing), investors may be better off taking a hard look at the other companies listed above and investing accordingly. 

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.