When those stodgy stock indexes are generating 30% returns for the year, you know it's a special time for the market. So it should come as no surprise that technology is the best-performing sector, rising some 48% year to date and turning in its best performance in over a decade.

Some analysts see the tech bull market continuing into 2020 driven by the advent of 5G networks that will push chipmakers and smartphone manufacturers to new heights. For now, here are the top 10 best-performing tech stocks in 2019, a few of which may surprise you.

Mobile smartphone with email icon

Image source: Getty Images.

10. Ultra Clean Holdings (Up 176%)

Ultra Clean Holdings (UCTT 2.54%), a maker of semiconductor manufacturing equipment, is one of the beneficiaries from the race to 5G, which should increase spending on semiconductor capital equipment. 

Ultra Clean's business relies on two primary customers, Lam Research and Applied Materials, for about 60% of revenue. With shares of those two up 115% and 86%, respectively, in 2019, it's not surprising their coattails carried Ultra Clean along, too.

9. Lattice Semiconductor (178%)

Lattice Semiconductor (LSCC 0.59%) manufactures field-programmable gate arrays (FPGAs) used in -- you guessed it! -- 5G wireless infrastructure. It enjoyed record profitability this year as the early stages of demand ramped up in earnest. With communications and computing components accounting for almost a third of its revenue, Lattice is expecting the coming year to bring more of the same.

8. Snap (191%)

A company not reliant on 5G networks is Snap (SNAP 6.50%), the social media camera company that once looked to be reeling out of control due to user defections from its Snapchat app. Most of those gains came early in the year, as it appeared to stabilize daily average users and found new ways to make money.

The back half of the year has only seen 12% gains in its shares as conservative guidance gave investors pause again.

7. Shopify (195%)

Cloud-based commerce leader Shopify (SHOP 1.60%) has cashed in on the boom in e-commerce, providing merchants with the tools they need to create an immersive shopping experience for customers. Now it is branching out into order fulfillment, acquiring a leading provider of collaborative warehouse-fulfillment solutions.

Shopify is still recording significant losses. But as it continues to grow, that hasn't deterred investors -- or potential acquirers: CNBC's Jim Cramer says two Silicon Valley tech companies are interested in acquiring the e-commerce platform provider.

6. Telaria (230%)

Ad tech specialist Telaria (TLRA) recorded its first quarter of positive EBITDA this year as connected TV ads served through the company's video management platform benefited from the growth of programmatic ad buying. 

Telaria got another boost two weeks ago when it and Rubicon Project (MGNI 6.40%) agreed to merge and create the world's largest independent sell-side advertising platform.

5. Sea Limited (247%)

Sea Limited (SE 1.38%) is a Southeast Asian gaming and e-commerce company that licenses games from publishers like Tencent and Activision Blizzard, while also producing first-party games like Free Fire.

Fortnite proved the popularity of battle royale games, and Free Fire has grossed over $1 billion since launching two years ago. Revenue continues to grow at triple-digit rates, and it is expecting Call of Duty: Mobile in Southeast Asia to continue the trend.

4. Digital Turbine (304%)

Digital Turbine (APPS 11.93%) is a platform that offers wireless carriers ways to monetize their mobile content by introducing product features aimed at improving conversion and engagement on mobile ads. But it relies primarily upon Verizon and AT&T for the bulk of its revenue, accounting for 46% and 39% of the total, respectively.

Now it is looking to scale its platform internationally, recruiting global carriers and OEMs to expand its global addressable market.

3. Diebold Nixdorf (340%)

Connected commerce leader Diebold Nixdorf (DBD) is arguably best known for its ATMs at banks. Its path to a 340% stock gain for the year has been predicated on a lot of double-digit gains and losses that followed earnings announcements that either exceeded or grossly missed analyst expectations.

With products like its K-two kiosk system that helps retailers enhance their in-store experience, Diebold can offer configurations to allow for product information, ticket and lottery sales, and even self-checkout. Dave & Busters recently began installing the K-two system to dispense Power Cards for game play at its restaurants.

2. Enphase Energy (466%)

Enphase Energy (ENPH 1.11%), which makes solar panel microinverters, benefited when China's Huawei exited the market due to  security questions during escalating trade tensions. But its business was already soaring because its microinverters and AC modules (a compact design incorporating microinverters and photovoltaic modules) simplify solar panel installation and design. 

Enphase recently announced it has installed 1 million microinverter-based solar systems.

1. Cardlytics (500%)

The year's big tech winner was Cardlytics (CDLX 2.15%), the appropriately named credit card analytics company. It takes anonymized debit, credit, and bill-pay data from banking customer accounts, and then partners with marketers to fashion online and mobile rewards-marketing campaigns. While it has relationships with over 20 financial institutions, Bank of America represents nearly 50% of its revenue in the U.S. It recently completed a rollout to Chase customers and is now adding its services to Wells Fargo.

There seems to be an expectation that Cardlytics has yet to reach a saturation point and can continue expanding here and abroad.