What happened Cybersecurity software specialist FireEye (NASDAQ: FEYE) gained 24% through the first half 2017, according to data provided by S&P Global Market Intelligence. The rally helped longer-term shareholders recover a bit of lost ground following a brutal 2016 that saw the stock tumble by over 40%. FEYE data by YCharts So what FireEye's outperformance so far this year can be tied to improving operating trends. The company in early May announced first-quarter results that beat management's expectations across the key metrics of revenue, billings growth, and operating income. Image source: Getty Images. The company remains deeply in the red, but at least the important numbers are headed in the right direction. Revenue rose 3% in the first quarter, instead of declining by 1% as executives had predicted. Gross profit margin improved from 70% of sales to 73%, and aggressive cost-cutting helped the company achieve a 7% loss on operating margin, compared to a 44% loss in the year-ago period. "We made continued progress on our path to profitability in the first quarter, improving operational efficiency while managing transitions on multiple fronts," CEO Kevin Mandia said in a press release. Now what Mandia and his team are forecasting that sales gains will accelerate in the second half as FireEye's customer base grows and it markets expanded offerings like the just-released Helix security platform. The company is aiming to achieve positive non-GAAP operating margin by the fourth quarter while also generating -- rather than burning through -- cash. Investors are growing more optimistic that FireEye will hit those goals without sacrificing long-term growth by slicing too much from its marketing and research and development budgets. 10 stocks we like better than FireEyeWhen investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.* David and Tom just revealed what they believe are the 10 best stocks for investors to buy right now... and FireEye wasn't one of them! That's right -- they think these 10 stocks are even better buys. Click here to learn about these picks! *Stock Advisor returns as of July 6, 2017Demitrios Kalogeropoulos has no position in any of the stocks mentioned. The Motley Fool recommends FireEye. The Motley Fool has a disclosure policy.