SAN FRANCISCO — The importance of mobile technology to Silicon Valley's future was dramatically underscored Wednesday in sharply differing performances of two of technology's biggest stars.

In a week where mobile helped drive the fortunes and the shares of tech giants IBM and Google, Netflix extended its rebound from a tough 2012 with better-than-expected sales of its streaming products while industry legend Apple stumbled for the second straight quarter, and third in five quarters.

Like nearly every major tech player, Apple and Netflix are banking their fates on mobile, which has bedeviled the tech market for years as companies large and small try to cash in on the sales of millions of smartphones and tablets.

Mobile is the "key to every major tech company's future success," says Matt Kojalo, general manager of mobile at advertising network Chitika. "Apple and Netflix have made strides in mobile, but they still need to develop products focused solely on mobile users and better support them."

Netflix credited its profit in part to more people buying tablets and smart TVs. It is addressing the mobile and desktop fields with original content and partnerships with major media companies, such as Disney, that would strengthen its transition to streaming movies and TV shows. Netflix remains the largest video-streaming service, with 33 million subscribers. Its shares surged 33% in after-hours trading.

Apple was another story.

After the markets closed, it reported that it sold a record 47.8 million iPhones. Yet that fell short of analysts' expectations for the busy holiday shopping season, sending Apple shares tumbling 10% in after-hours trading. Disappointing results are the latest bad news Apple has endured in recent months as it has been disparaged for losing its innovative edge while competing with an armada of ambitious rivals, such as Google, Amazon.com and Facebook.

There are also lingering worries over its core iPhone business amid pricing pressures and a Wall Street Journal report of a decline in components orders. (The WSJ cited an unnamed Foxconn executive as its source.) The 6-year-old brand is fending off cheaper models from Samsung and Microsoft.

Apple is merely the highest-profile case study of high-tech's dizzying dance with mobile devices. As millions of Americans snap up smartphones and tablets, the industry's largest players — weaned on building PCs, laptops and computer systems for both — must adapt quickly. Relative newcomers like Facebook and Google, meanwhile, are trying to figure out how to generate mobile advertising revenue.

It's all been a shock to longtime tech players such as Hewlett-Packard, Oracle and Microsoft. IBM has poured $16 billion into analytics companies since 2007. HP's effort to become a major player in data analysis — it spent $11 billion on Autonomy in 2011 — ended in a controversial, $8.8 billion write-down. Microsoft, meanwhile, has spent lavishly on building its own computing cloud and is eyeing a $1 billion to $3 billion investment in Dell, according to multiple reports, quoting unnamed sources.

"Companies that do not change fast enough will be left behind," says John Chambers, CEO of Cisco Systems, which is in the midst of reshaping itself in the mobile age.