The Internet of Things (IoT) is taking shape and smaller companies are emerging as leaders in this new tech segment. Among them, Ambarella (AMBA -2.41%) and NXP Semiconductors (NXPI 0.25%) are forging their own IoT strongholds and both have a promising future ahead of them.

But only one stock is attaching the Internet of Things on several fronts. Read on to find out which one it is.

What they do
Ambarella's small-cap status -- just $2.26 billion -- allows the company to fly under the radar and leaves all the attention-grabbing to the devices it helps power, like GoPro's ultrapopular line of action cameras.

The company's system-on-a-chip (or SoC) is the brains behind many of the greatest action photography of today, but Ambarella's not stopping there. The company's SoC's can also be found in high-end filmmaking drones, Chinese vendor Xiaomi's action cameras, as well as intelligent automotive and security system cameras.

While Ambarella's all about chip systems, NXP Semiconductors focuses on getting devices to communicate with each other. The company made recent headlines when it was discovered that Apple is using NXP's near-field-communication (NFC) chips for its Apple Pay system. But the good times don't stop there. NXP also made one of the first mass-produced chips for vehicle-to-vehicle (V2V) and vehicle-to-infrastructure (V2I) communication -- two leading technology systems for autonomous vehicles.

If that weren't enough, NXP just made a deal last month to merge with fellow IoT company Freescale Semiconductor, which will make the combined company the fourth-largest semiconductor maker and the top semiconductor supplier to the automotive industry.

How fast they're growing
Over the past 12 months both companies have easily beat the S&P 500, with Ambarella skyrocketing more than 170% and NXP Semiconductors up just over 60%.


Source: YCharts

While that's been great news for both sets of investors, we all know that stock prices don't paint the entire picture. So, what about the most recent financials?

In Q4 2014, Ambarella's revenue growth spiked 62% year over year, and net income popped 176%. While GoPro is a huge part of the company's business, investors should consider that more than half of Ambarella's revenue is generated from its other customers. So, there's no need to worry about Ambarella leaning too hard on just GoPro. The stock currently trades at 47 times earnings, so obviously this isn't a "cheap" buy. But with its current growth, and potential in new and existing businesses, I don't think investors should get too hung up over the current P/E ratio.

NXP had a good quarter as well, though not as good as Ambarella's. NXP's total revenue increased nearly 19% year over year, helped by strong revenue from the company's identification business. For the full-year 2014, NXP saw its revenue increase 17% year over year, which the company said is "greater than two-times the overall growth of the semiconductor industry." And NXP's stock trades at about 46 times its earnings, nearly identical to Ambarella.

If I have to choose one ...
As with many of the IoT stock comparisons I've done, this is a close call. I really like Ambarella's SoC status in action cameras right now. The company's dominate technology makes it the go-to solution for running these devices, which means it doesn't have to rely on just one customer in order for the company to perform well.

On the flip side, NXP is a very strong company as well and already has its hand in several IoT opportunities. I can't help but think of how powerful NXP will be when it closes the deal with Freescale later this year (unless there is regulatory pushback) and becomes the leading chipmaker for autos and general-purpose microcontrollers. That news, mixed in with company's current growth, gives NXP the win in this comparison.

Though I believe Ambarella is a great company with lots of growth ahead, I'm eager to see what comes out of the powerhouse NXP Semiconductors will be once it closes the merger with Freescale. Investors likely won't be disappointed with either stock, but I think NXP has more potential over the long term.