Palo Alto Networks (PANW -1.22%) and FireEye (MNDT) are often mentioned as "best in breed" cybersecurity companies. Palo Alto, which provides next-gen firewalls, serves over 45,000 customers in more than 150 countries. FireEye, a pioneer in threat detection solutions, serves 5,800 customers in 67 countries.

Yet Palo Alto's stock has more than tripled since its IPO in 2012, while FireEye's stock remains almost 30% below its 2013 IPO price. Investors seem to believe that Palo Alto is a better cybersecurity stock than FireEye, and I think they're right -- for four simple reasons.

A hacker types on a keyboard.

Image source: Getty Images.

1. Better revenue growth

Palo Alto's revenue rose 49% in fiscal 2016 and 28% in 2017, and analysts anticipate 23% growth this year. The company's growth is decelerating, but its growth figures are robust for a 12-year-old company. They also counter the bearish notion that bigger players like Cisco could render it obsolete with bundled firewalls.

Palo Alto attributes that growth to its "land-and-expand" model, in which it secures firewall customers before selling them additional services. It's also been promoting a newer hybrid cloud SaaS (software as a service) platform that generates more subscription-based revenues.

FireEye's revenue rose 46% in fiscal 2015 and 15% in 2016, and analysts expect just 4% growth this year. FireEye attributed that slowdown to a shift from on-site appliances, which generate higher initial revenues, toward cloud-based services, which generate more sustainable subscription-based revenues.

FireEye believes that its sales growth will stabilize as more customers migrate to Helix, a unified platform that merges FireEye's threat prevention, MVX engine, iSIGHT intelligence, and analytics services on a single platform. Its newer product HX also adds additional malware protection for network endpoints.

2. Better earnings growth

Palo Alto is consistently profitable on a non-GAAP basis, but remains unprofitable on a GAAP basis due to high stock-based compensation (SBC) expenses. FireEye remains unprofitable by both metrics, but it hopes to achieve non-GAAP profitability during its current (fourth) quarter through cost reductions, layoffs, and operational improvements.

Palo Alto's non-GAAP earnings improved 43% last year, and Wall Street expects 26% growth this year. FireEye's non-GAAP loss narrowed from $1.61 per share in 2015 to $0.99 last year, and analysts expect a loss of just $0.18 this year.

FireEye's bottom line improvements are encouraging, but Palo Alto still has much higher margins thanks to its superior scale and the growth of its higher-margin SaaS platform.

PANW Gross Profit Margin (TTM) Chart

Source: YCharts

3. Stronger cash flows

Maintaining a strong cash position is essential for high-growth tech companies with weak GAAP profitability, since running out of cash often leads to dreaded secondary offerings that dilute existing shares. Palo Alto and FireEye have both resorted to secondary offerings before.

But Palo Alto is now sitting on a comfortable cash cushion -- its cash and equivalents rose 13% sequentially to $843 million last quarter. FireEye's cash position rose just 4% sequentially to $161 million last quarter. Palo Alto's free cash flow remains much stronger than FireEye's, which remains deep in the red.

PANW Free Cash Flow (TTM) Chart

Source: YCharts

4. Avoiding negative headlines

The worst thing that can happen to a cybersecurity company is an internal data breach. But this summer, a hacker claimed to have gained complete access to FireEye's internal networks (via a Senior Threat Intelligence Analyst at its Mandiant subsidiary).

FireEye declares that the claim is false, and stated during last quarter's conference call that the individual was arrested in late October. Nonetheless, the debacle was a black eye for FireEye, and Palo Alto didn't face any similar issues.

The bottom line

As the number of data breaches rises worldwide, demand for cybersecurity services will inevitably grow. That's why research firm Markets and Markets expects the global cybersecurity market to grow from $138 billion this year to $232 billion in 2022.

Investors should know how to separate more promising cybersecurity stocks, like Palo Alto, from potential losers like FireEye. Palo Alto is still firing on all cylinders, while FireEye is scrambling to cut costs amid declining revenues -- so it's clear that the former is a better long-term security play than the latter.