The data security market was disappointing last year, and shareholders in both FireEye (NASDAQ:FEYE) and its peer Check Point Software (NASDAQ:CHKP) paid the price as the stocks delivered lackluster performances. But so far, 2017 has been far more pleasant: FireEye and Check Point shares are soaring, up 33% and 35%, respectively.

But other than sharing a market that some pundits expect will generate as much as $1 trillion  in revenue between now and 2022, their impressive share price runs have been propelled by decidedly different stories.

FireEye reported anemic top-line growth and another per-share loss for its first quarter, but its stock has rallied 8% since it shared its results. Check Point, by contrast, has consistently overachieved on the top and bottom lines, and its subscription-based, recurring-revenue model is hitting on all cylinders. So answering the question of which is the better buy, FireEye or Check Point, should be a snap right? Not so fast.

Close-up image of network cables.

Image source: FireEye.

The case for FireEye

After FireEye posted a 3% increase in revenue of $173.7 million to kick off the year,  its stock soared 13% to end the May 2 trading day. The reasons for such giddiness were twofold: One, FireEye's sales beat  analysts' estimates. Secondly, guidance for Q2 revenue in the $173 million to $179 million range also surpassed expectations.

Of course, large gains in share price based solely on performance relative to pundits' estimates rarely last. But in FireEye's case, the bullishness is warranted. After CEO Kevin Mandia took the helm, big changes followed, including layoffs and a restructuring. The biggest maneuver involved cutting overhead while instituting a shift away from hardware to cloud-based security software. Now, investors are beginning to see the light at the end of the tunnel for FireEye isn't a train after all.

Mandia asserted that FireEye made "continued progress on our path to profitability in the first quarter, improving operational efficiency while managing transitions on multiple fronts," and he was right. FireEye's operating expenses nosedived 28% to $180.85 million last quarter, and cost of revenue sank nearly 10%, even as revenue rose. The company lost $0.48 a share, but that was half the magnitude of 2016's Q1 loss. Excluding one-time items, FireEye's EPS loss of $0.09 was a fraction of 2016's $0.47 a share adjusted loss.

Screenshot of a Check Point security interface.

Image source: Check Point Software.

The case for Check Point

Check Point Software's first quarter revenue   increased 8% year over year to $435 million, and its EPS of $1.08 was an impressive 15% improvement. Check Point's deferred revenue, a sign of what to expect going forward, shot up 20% to $1.06 billion. But the icing on the cake was its software subscription sales.

Subscription sales and the recurring revenue they generate jumped 27% to $112 million, and they continue to make up a larger fraction of total revenue each quarter. What makes Check Point's recurring revenue so appealing from an investor standpoint is that it's a relatively predictable foundation to build upon with each successive quarter.

Another positive, and a critical reason CEO Gil Shwed implemented the change to a subscription software model, is that it simply costs less to steadily grow ongoing revenue than to rely on a few big sales each quarter. In Q1, Check Point's revenue rose by more than $31 million compared to a year ago, but its operational expenses increased by just $22.6 million.

And the better buy is?

FireEye demonstrated again last quarter that its own shift to cloud-based software is working, and its efforts to increase operational efficiency are humming along at a fantastic clip. A lot of CEOs talk about streamlining costs, but FireEye is walking the walk, and that speaks volumes about Mandia and the leadership team.

The biggest difference between Check Point Software and FireEye is that Shwed started heading in the right direction earlier, so it's further along that path, which is obviously working like a charm. That, combined with FireEye's share price may be a bit ahead of itself, means that between these two, Check Point -- by an ever-so-slight margin -- gets the nod.

Tim Brugger has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Check Point Software Technologies. The Motley Fool recommends FireEye. The Motley Fool has a disclosure policy.