At $14.25 billion in market capitalization, Palo Alto Networks (PANW 0.62%) is the big boy on the block compared to FireEye (MNDT) and its current $2.5 billion valuation. But there are a number of similarities between the two companies, including facing the same challenges. However, Palo Alto and FireEye are also making strides in strategic areas.

Analysts are relatively bullish for both. FireEye's consensus target price of $18.07 is 23% above Sept. 28's closing price. Pundits believe Palo Alto shares are worth $180.66 in the near future, equal to 17% appreciation. The pundit's upside expectations are a bit misleading in that Palo Alto's stock is up 25% in the last three months, while FireEye has sunk 8%.

Analysts aside, which is the better buy, Palo Alto or FireEye? The answer is closer than some investors may think, but one holds a slight edge.

Image source: FireEye.

The case for FireEye

Another metric FireEye shares with Palo Alto, along with most of its peers in the hyper-competitive data security market, is slowing sales. FireEye nailed its first quarter, reporting a whopping 34% jump in revenue year over year to $168 million. Then the other shoe dropped. FireEye's $175 million in sales last quarter was higher sequentially, it was just a 19% improvement.

CEO Kevin Mandia and the FireEye board are responding to its slowing top-line growth, with last quarter's news that a workforce reduction and restructuring plan are in the works. Considering FireEye's sky-high expenses -- cost of revenue and operating expenses combined totaled over $300 million last quarter -- drastic measures are needed, and trimming overhead by "at least $20 million" this year is a step in the right direction.

The restructuring plan also calls for a return to profitability, after accounting for one-time expenses, by the end of 2017 -- and FireEye is heading in the right direction. Limiting expenses is priority one, but its emphasis on subscription-based sales -- and the recurring revenue they generate -- is building a foundation for a less volatile future due to the relative stability that on-going income brings to the table.

Last quarter's revenue gains sure didn't come from product sales, which declined nearly 20% compared to a year-ago. But FireEye's subscription and services unit soared 38% to $134.3 million and now accounts for 77% of total revenue: That's up from 66% in 2015.

Image source: Palo Alto Networks.

The case for Palo Alto

The distinction between the slowing sales of FireEye and Palo Alto is scale. Palo Alto reported a 48% revenue improvement in its fiscal third quarter ending April 30, bringing its nearly two-year-long string of 50% or more quarterly gains to a halt. But at 48%, Palo Alto's revenue increase was still impressive.

Though sales "only" jumped 41% in its most recent quarter, the downward trend has been easier for investors to rationalize than FireEye's slowdown. But guidance for the current quarter of $396 million to $402 million -- equal to a 33% to 35% increase year over year -- didn't sit well with investors. The Street's confidence in Palo Alto has since been restored, but the ebbing top-line growth is tougher to swallow given its own spending woes.

Last quarter operating expenses soared 41% compared to last year, matching Palo Alto's revenue gain, and cost of revenue climbed 37% to $101.7 million. Not surprisingly Palo Alto's losses continued to climb, though non-GAAP (excluding one-time items) per-share earnings popped 56% to $0.50 a share, compared to 2015's $0.28.

As one of the innovators in delivering security solutions via its "next generation security platform," Palo Alto is also making significant inroads in building its subscription-based, recurring revenue initiative. In fiscal-year 2015's fourth quarter product sales accounted for 54% of total revenue. This year the product unit generated 48% of Palo Alto's $400.8 million in revenue, with the balance of $209.7 million derived from service sales.

That's an impressive turnaround in a relatively short time period, and combined with its very real, but intangible, "positive investor sentiment" and the momentum that goes with it, not to mention the uncertainty surrounding FireEye's restructuring, Palo Alto gets the nod as the better buy.