Logitech (NASDAQ:LOGI) and Turtle Beach (NASDAQ:HEAR) both produce peripherals for PCs and gaming consoles. However, the two stocks have treated investors very differently in 2018: Shares of Logitech have increased just 8% year to date after giving up some big gains over the past few months, while Turtle Beach's stock has rallied nearly 1,000%.

What caused Turtle Beach to generate a multi-bagger return while Logitech floundered? Let's compare the two companies to see if either stock is worth buying at these levels.

A young woman plays a video game.

Image source: Getty Images.

What do Logitech and Turtle Beach do?

Logitech sells mice, keyboards, webcams, tablet accessories, video collaboration products, mobile speakers, sports wearables, gaming headsets and controllers, and smart home devices. It often expands its portfolio through acquisitions, including companies like Ultimate Ears, Mirial, Mad Catz, Astro Gaming, and Blue Microphones.

Logitech's two biggest business units are its pointing devices and keyboards & combos segments. These two units generated 44% of company revenue during the first half of 2018. However, Logitech generates most of its expansion from three smaller segments: tablet & other accessories, video collaboration, and gaming. Those three units, which all generated double-digit growth during the first half of the year, accounted for 28% of the organization's total top line.

Logitech's two weakest businesses are the mobile speakers and smart home units. Both units, which together accounted for 11% of total company revenue in the first two quarters of 2018, posted double-digit declines during that period. It could be argued that Logitech's diversified portfolio makes it a "jack of all trades but a master of none," since declines at its weaker businesses often offset the growth of its stronger ones.

Turtle Beach has been through many transformations since its founding in 1975, but today it generates nearly all of its revenue from high-end wireless gaming headsets for gaming consoles and PCs. The company launched the first wireless gaming headset for the Xbox One just as the "battle royale" boom started last year with games like PUBG and Fortnite. Those games, which require constant communication between team members, caused a massive spike in demand for Turtle Beach's headsets.

Turtle Beach's first mover's advantage helped it claim 45.5% of the console gaming headset market in the U.S. and Canada in June according to NPD, compared to a 39.8% share a year earlier. This makes Turtle Beach the master of a single trade which is highly exposed to a single market.

A gamer plays a video game.

Image source: Getty Images.

Which company is growing faster?

Logitech's revenue rose 9% year over year to $691 million last quarter, which beat expectations but marked its weakest growth in seven quarters. However, the company's growth last year was also inflated by its $85 million buyout of Astro Gaming, which produces high-end gaming headsets. It also recently purchased Blue Microphones for $117 million, which contributed 1% to its overall sales growth during the second quarter.

Logitech's non-GAAP gross margin expanded 110 basis points versus the prior year to 37.6% last quarter, and its GAAP gross margin also rose 110 basis points to 37.1%. That growth indicates that Logitech still enjoys pricing power across its core markets.

For the full year, Logitech expects its revenue to improve by 9% to 11%. Analysts expect its earnings to rise 14%. Those are steady growth rates for a stock that trades at 17 times forward earnings, and the company pays a decent forward dividend yield of 1.7%.

Turtle Beach's revenue surged 218% to $60.8 million year over year during the second quarter, which represented an acceleration from its 185% growth in the first quarter. Most of that growth was attributed to the popularity of Fortnite and PUBG. For the third quarter, the company expects revenue to rise 103% to 106% against the prior year, and it anticipates that full-year revenues will advance at least 71%.

Turtle Beach's revenue growth is decelerating, but its gross margin still expanded 30 basis points to 33.3% during the second quarter against the comparable three-month period. This indicates that competing headsets from rivals like Logitech, Razer, and LucidSound aren't hurting its pricing power yet.

Wall Street expects Turtle Beach to post a full-year profit of $2.42 per share, compared to a loss of $0.28 per share last year. However, analysts expect its earnings to drop 21% next year as its sales decelerate. This means that while Turtle Beach's stock looks cheap at 10 times forward earnings, its overwhelming dependence on the battle royale trend and looming competition from rival headset makers make it a riskier bet.

The winner: Logitech

I personally don't like either stock at these prices, since both companies face decelerating growth rates in an unforgiving market. But if I had to choose one, I'd pick Logitech over Turtle Beach -- it has a more sustainable, better diversified business, and offers a decent dividend.

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.