By virtually all estimates, the cybersecurity market will balloon over the next several years, and it's not hard to see why. Recent hacks affecting hundreds of millions of people around the globe point up the necessity to protect sensitive systems. And the Internet of Things (IoT) and cloud data centers are amassing and housing previously unheard of quantities of data. One estimate suggests the cybersecurity business will generate over $134 billion  in revenue this year, and mushroom to over $200 billion in 2021.

Both Palo Alto Networks (PANW 1.03%) and Fortinet (FTNT 0.48%) are benefiting from those trends, and stand to gain further. But which is the better buy today? Let's peel away the layers and consider.

Digital image of a globe blanketed with a cloud data security blanket.

Image source: Getty Images.

The case for Palo Alto

If this statement sounds like a broken record to you, it should: Palo Alto announces quarterly revenue and earnings minus one-time items that beat expectations. The company has done so repeatedly, and it recently did it again,   reporting a record $505.5 million in revenue, good for a 27% year-over-year improvement in its fiscal first-quarter 2018.

Adjusted EPS of $0.74 also obliterated the company's own guidance and analysts' estimates. Within two days, Palo Alto stock was up 6%. But, as usual, the optimism was short lived and the share price has returned to pre-earnings levels. Upon further review, Q1 wasn't quite as stellar as it first appeared.

To the company's credit, deferred revenue -- a good indicator of its sales pipeline -- increased 37% to $1.9 billion. It's safe to say Palo Alto's top line will continue to swell. However, its spending negated its revenue growth -- again.  A 21% rise in operating expenses to $418.4 coupled with a jaw-dropping 40% increase in cost of revenue to $141.4 million ate away at Palo Alto's revenue gains.

The result of rising overhead was that Palo Alto's EPS including all expenses actually declined 11% to a loss of $0.70 a share. Some may argue Palo Alto is in hyper-growth mode, so its open-checkbook policy is warranted. It's a legitimate point. And if Palo Alto eventually does get a handle on expenses and maintains revenue growth, it could prove to be a good buy.

Circular drawing of Fortinet's end-to-end data security solution.

Image source: Fortinet.

The case for Fortinet

Fortinet also reported strong total  revenue of $374.2 million, an 18% year over year increase. Deferred revenue also soared, up 30% to $1.22 billion, which bodes well for the coming year.

On the downside -- at least from many watchers' perspectives -- Fortinet's sales guidance for the current quarter of $404 million to $412 million was a disappointment that muted its post-earnings stock price gain. At the midpoint, revenue  would "only" be up 12.5% from last year's $362.8 million.

But there's a bit more to the story. Founder and CEO Ken Xie has made managing expenses a priority, and a glance at Fortinet's bottom line makes it clear his initiatives on that front are paying dividends. Last quarter, operating expenses were up, but only 9% to $246.9 million while cost of revenue rose 10% to $93.65 million. Both bumps in spending were decidedly smaller than in previous quarters.

The end result of Xie's efforts to make Fortinet a more efficiently run company was the near-quadrupling of EPS from 2016's $0.04 to last quarter's $0.15 a share. Though revenue growth may slow, profits should continue to climb thanks to Xie's focus on expense management.

The envelope please

One of the beefs I have with Palo Alto is how much it pays its sales and marketing folks. Last quarter, it shelled out $258.5 million to drive sales, equal to 51% of total sales. Sure, some of that was in stock, so Palo Alto bulls may shrug it off. But I don't. It's still an expense.

Fortinet spent $172.4 million -- 46% of it revenues -- on its sales efforts which is still awfully high in my book. That's actually an improvement from prior quarters, though, and another indication that Fortinet's cost-cutting plans are working. Shrinking expenses and soaring profits -- and signs that both trends will continue -- are why Fortinet is hands-down a better buy than Palo Alto.