SAN FRANCISCO — Marissa Mayer, just by being Marissa Mayer, has done more to move Yahoo forward in her first six months as chief executive than any of her five predecessors did over as many years.

An accomplished engineer and executive, Ms. Mayer joined Yahoo from Google as a Silicon Valley celebrity. Since then, just her presence at the company’s Sunnyvale, Calif., headquarters seems to have jolted Yahoo back to life. On Monday, Yahoo reported a good quarter, increasing revenue for the first time in four years and beating Wall Street expectations by 30 percent.

That pushed Yahoo’s stock to $20.91 in after-hours trading — a four-year high (but still well below the $31 Microsoft offered the company back in 2008).

Ms. Mayer attributed growth to a renewed focus on “people and products” in a call with analysts on Monday.