Impinj (NASDAQ:PI) and Arista Networks (NYSE:ANET) serve different markets, but both companies benefit from the global growth of the IoT (Internet of Things) -- a system linking devices to each other and the cloud.

Impinj sells RFID (radio frequency identification) chips for tracking items, as well as the systems and software for processing the chips. It generates most of its growth from retailers, which use RFID chips to track their inventories and streamline their businesses.

Arista sells networking switches optimized for software-defined networking (SDN) solutions. It's pulling customers away from bigger companies like Cisco (NASDAQ:CSCO), since SDN solutions -- which are linked to its open-source EOS platform -- are generally cheaper and less restrictive than bundled solutions.

Networking connections across the globe.

Image source: Getty Images.

Mordor Intelligence estimates that the IoT market could still grow at a compound annual growth rate of 21% between 2020 and 2025. Impinj and Arista both seem well-poised to profit from that long-term growth -- but which stock is the better buy?

Which company is growing faster?

Impinj and Arista both operate in cyclical industries. Impinj's growth accelerated last year as retailers scrambled to buy more RFID chips and readers to streamline their businesses and counter rivals like Amazon (NASDAQ:AMZN).

Arista posted surging growth in previous years as enterprise customers upgraded their networks and it acquired smaller companies like Mojo Networks and Metamako. However, its growth decelerated over the past year as one of its top "cloud titan" customers placed fewer orders.

Revenue Growth (YOY)

Q3 2018

Q4 2018

Q1 2019

Q2 2019

Q3 2019

Impinj

5.5%

28.9%

31.9%

33.8%

18.5%

Arista Networks

28.7%

27.3%

26%

17%

16.2%

Data source: Quarterly reports. YOY = Year over year. 

Impinj expects its fourth-quarter revenue to rise just 10% year over year as orders of systems cool off. Arista expects its fourth-quarter revenue to fall 6% to 9% annually, due to the ongoing declines at its major cloud customer.

Analysts expect Impinj's revenue to rise 22% this year and another 14% next year. The future looks dimmer for Arista, as the company is expected to generate 12% revenue growth this year but roughly flat growth next year.

Which company is more profitable?

Impinj and Arista both reported stable gross margins over the past year.

Gross Margin

Q3 2018

Q2 2019

Q3 2019

Impinj

50%

50%

50.2%

Arista Networks

64.6%

64.7%

64.4%

Non-GAAP. Data source: Company quarterly reports.

Impinj didn't provide an exact margin forecast last quarter, but warned that lower seasonal sales and annual pricing negotiations "typically" reduced its gross margins during the fourth and first quarters. Arista expects its fourth-quarter gross margin to come in between 63% and 65% -- an indication that it still has plenty of pricing power against bigger rivals like Cisco.

An RFID chip and a bar code.

Image source: Getty Images.

Impinj isn't profitable on a GAAP basis, due to high stock-based compensation expenses. On a non-GAAP basis, it squeezed out a narrow profit of $1.9 million from revenue of $40.8 million last quarter. Analysts expect its non-GAAP earnings per share to double this year and quadruple next year -- but the stock still looks pricey at nearly 800 times forward earnings.

Arista is consistently profitable by both GAAP and non-GAAP metrics. Last quarter, it generated $208.9 million in GAAP profits and $217.1 million in non-GAAP profits from revenue of $654.4 million -- which gives it much higher net profit margins than Impinj.

Wall Street expects Arista's non-GAAP earnings to rise 20% this year, but the headwinds in the cloud market could cause a 5% earnings decline next year -- a poor growth rate for a stock that trades at 25 times forward earnings.

The winner: Impinj

Impinj and Arista are both promising long-term plays on the Internet of Things. However, Impinj is generating stronger revenue and earnings growth, and it doesn't suffer from as much customer concentration and direct competition as Arista. I'm still wary of Impinj's lofty valuation, but I believe the growth of the smart retail market could still propel this small-cap stock -- which already doubled over the past 12 months -- to fresh highs over the next few years.