Both FireEye (MNDT) and Check Point Software (CHKP -3.53%) have struggled a bit this year in terms of their respective stock prices. FireEye shareholders have really taken it on the chin in 2016, as its stock slowly rebounds from a post-second-quarter sell-off. To his credit, CEO Kevin Mandia and the FireEye board aren't sitting idly by while earnings continue to decline.

Check Point stock is also in the red this year, though its 5% easing is just a blip compared with FireEye's 28% nosedive. On the other hand, Check Point is consistently growing its top and bottom lines, but its 7% year-over-year revenue gain last quarter pales in comparison with FireEye's 19% improvement. The cybersecurity peers are taking different paths to growth, making the question of which is the better stock to buy a relatively easy one to answer.

Image source: FireEye.

The case for FireEye

The overriding takeaway from the second quarter was FireEye's decision to implement a "workforce reduction" and restructuring plan, which it hopes will shave at least $20 million in costs by the end of this year. Longer-term, the plan is to "achieve non-GAAP profitability in the fourth quarter of 2017." That's a tall order, but one look at FireEye's overhead makes it evident how necessary the tough move is, and it could give its stock a real boost once results begin to show.

The 19% increase in FireEye's sales last quarter was nice, but it was the 37% jump in subscription and service revenue to $134.3 million that really stands out. Similar to Check Point and others, the growth of FireEye's subscription revenue forms a stronger, more stable revenue foundation for the future, rather than rely on simply moving more and more product each quarter.

Subscription revenue is also less expensive to produce because it doesn't require as much sales and marketing costs for one, and that's an area FireEye really needs to get a handle on. With the restructuring plan in place along with growing subscription and service sales, FireEye may once again land on investors' radar.

Image source: Check Point.

The case for Check Point

Similar to FireEye, Check Point's 21% increase in subscription and software blade sales -- and the licensing fees those represent -- were the driving force behind its 7% total revenue gain last quarter. Unlike its competitors, however, Check Point CEO Gil Shwed has a firm grasp on spending. Take FireEye's sales and marketing costs equal to 69% of sales, for example: Check Point spent just 25% of its $422.7 million in revenue on its sales and marketing teams.

Shwed's stinginess is one reason Check Point was able to grow earnings per share 8% in its second quarter, and 10% after excluding one-time items. Though Check Point didn't share specifics, customer adoption of its new security appliance resulted in "a marked increase in unit sales" last quarter, which in turn helped pad its strong recurring subscription revenue.

As for its stock repurchase plan, Check Point brought nearly 3 million shares back in-house last quarter, and it has board approval to repurchase $250 million more. The 100 million fewer shares outstanding this quarter compared with a year ago has boosted EPS and will continue to do so long into the future.

Check Point's stringent cost controls and continued growth -- albeit slower than its competitors -- has also contributed to its rock solid balance sheet. Check Point has $1.3 billion in cash and short-term equivalents as of last quarter, $3.7 billion when longer-term marketable securities are tossed in, both up slightly over 2015. Not surprisingly given its spending, FireEye is bleeding cash with just shy of $917 million in ready funds compared with $1.17 billion a year ago, with no longer-term securities on the books.

So which stock is the better buy? Given the uncertainty surrounding FireEye's much-needed restructuring and its off-the-charts spending, particularly when compared with the consistently profitable Check Point even without the "wow factor" its competitors enjoy, the answer is clear-cut: Shwed and team win by a country mile.