The S&P 500 (SNPINDEX:^GSPC) market index gained 12% in 2014. That's pretty much in line with the market's 12% to 13% annual returns over the long term. As always, some stocks ran ahead of the pack, raising the market's average returns.

Here are three of last year's biggest winners in the tech sector, including a couple of unexpected surprises. Video game publisher Electronic Arts (NASDAQ:EA) more than doubled in price, while high-tech materials maker Corning (NYSE:GLW) and social networking giant Facebook (NASDAQ:FB) crushed the market in a kinder, gentler way.

Source: King of Hearts, via Wikimedia Commons.

The college of market-beating arts and sciences
Starting at the top, Electronic Arts delivered a shocking 105% gain in 2014 -- right on the heels of a 66% return in 2013.

This is largely an industrywide trend, as video game designers ride the support of recently updated consoles. Activision Blizzard (NASDAQ:ATVI) nearly doubled over these two years, and Take-Two Interactive (NASDAQ:TTWO) gained an even stronger 160%.

But of course, none of them can hold a candle to Electronic Arts' sector-leading 242% gains, including the 105% last-year surge mentioned above.

Fellow Fool Sam Mattera pinpoints the company's fantastic performance to the hiring of CEO Andrew Wilson in the fall of 2013. Wilson has turned around a terrible public image with the help of a smart sales and marketing revamp, latching on to digital distribution methods in a big way.

Thanks to Wilson's sharp thinking and execution, Electronic Arts is delivering consistent earnings and sharply rising cash flows, underpinning the big market move with solid fundamentals.

If you saw this market-crushing year coming when Wilson took the CEO job -- an unheralded internal promotion, and not even the most likely Electronic Arts veteran for the post -- your crystal ball is way better than mine. Now, the stock looks poised to continue beating the market, fueled by Wilson's new-age strategy and starting from reasonable share prices of just 14 times trailing free cash flows.

How much longer will this be the social network?
If Electronic Arts flew under the radar to get to the top, Facebook followed more of an open path. The social network beat back skeptics like yours truly by making large strides in mobile ad sales and delivering increasingly solid profits. Facebook's stock followed suit with a solid 43% gain.

Facebook is becoming a must-have advertising platform and a peerless viral marketing vehicle. My Foolish peers think it's just the beginning of a lasting trend, too.

Tim Brugger believes the stock can soar even higher in 2015, driven by efforts to make money from its splashy $2.7 billion Instagram buyout.

Brian Stoffel goes even further, calling Facebook a market-beater for the next decade. Why? Because founder and leader Mark Zuckerberg has a knack for finding the next big trend before the rest of us got tired of the last one. Instagram is just one example of this deep vision; Oculus Rift might be the next big winner.

This being the Motley Fool, I don't have to agree with my colleagues. My thumbs-down rating on Facebook is currently the biggest loser in my CAPS portfolio, but I have no plans to turn that frown upside down.

I'm impressed by Zuckerberg's success in 2014, but not convinced that he can keep the good times rolling. The social media market has a history of sudden, violent upheavals, and the younger generation is already showing signs of getting bored with current leader Facebook. If and when they move on to the next global water cooler, turning Facebook into the next MySpace (Ouch!) or Friendster (Who? Exactly!), I'd hate to have that stock in my retirement portfolio.

Facebook may make it through 2015 without hitting that brutal event. But for every year Facebook continues to lead its core market of social networking, I'm more convinced that it might be the last one. Don't back up the truck to this stock -- make sure you can afford to lose whatever you put into it.

Flat-out speed
Rounding out this market-beating rally, Corning turned a corner in 2014 with a 32% return on your investment.

Its mobile screen-cover dominance was threatened by up-and-coming sapphire alternatives, until that threat literally fell apart. Meanwhile, Corning presented even thinner and stronger Gorilla Glass products for mobile applications and made a play for large-screen television screens. That timing of that last move could prove prophetic if consumers around the world start upgrading their TV sets to next-generation 4K screens in 2015, as they very well might.

Until then, Corning investors can revel in a hockey-stick growth curve for the glassware veteran's cash flows. Despite Corning's huge share price gains in 2014, the market might still not have factored in all of its refreshed cash-making proficiency, not to mention the growth drivers already discussed:

GLW Free Cash Flow (TTM) Chart

GLW Free Cash Flow (TTM) data by YCharts.

Corning has close ties to the unstoppable mobile computing market, but it doesn't live and die by that industry alone. If you're looking for a proven veteran with diverse end-user markets and a rocket plume of momentum at its back, Corning might be worth a second look today.