Investing done well can be boring, and that's how it needs to be. Legendary investors have emphasized the importance of long-term investing. Renowned economist Paul Samuelson famously explained, "Investing should be more like watching paint dry or watching grass grow. If you want excitement, take $800 and go to Las Vegas." 

It is almost impossible to time the market, and very few people have been successful in doing so. That's why it's so much more important to bet on companies that have strong fundamentals rather than stocks. You need to have a long-term view to benefit from the power of compounding that results in exponential returns.

Let's look at two tech giants that have outperformed the market in the last decade -- and should continue to do so in the upcoming one as well.

A man holding a tablet horizontally, while a digital projection of a graph moving higher extends up from its surface

Image source: Getty Images.

1. Microsoft is a tech behemoth

Microsoft (NASDAQ:MSFT) is currently just one of two publicly traded stocks to be valued at over a trillion dollars in terms of market cap. The other is Apple. Microsoft stock has been a tremendous wealth creator for investors for several decades.

As seen in the chart below, if you had invested $10,000 in Microsoft a decade ago (and near the end of the Great Recession), that investment would be worth a staggering $50,060 today. But what has driven the company's stock price higher?

In fiscal 2019 (which ended in June), Microsoft experienced strong revenue growth across business segments. Its personal computing business saw revenue growth of 8.1%, while productivity and business processes segment revenue was up 14.8%. The fastest-growing segment for Microsoft was Intelligent Cloud, which experienced growth of 21%. 

In the September quarter, Microsoft managed to grow total sales by 14% year over year to $33.1 billion, while operating income and net income were up 27% and 21%, respectively, year over year. 

Revenue was driven by strong growth in the commercial cloud vertical, which continues to scale. It won a cloud contract for the Pentagon's Joint Enterprise Defense Infrastructure (JEDI) deal that left Amazon fuming. The contract is valued at $10 billion over a period of 10 years.

Microsoft is quickly gaining market share in the public cloud segment and is growing at a higher rate than the overall market. There is a tremendous opportunity for Microsoft to replace legacy systems within several federal government departments over the next few years.

The company has also identified secular long-term growth opportunities across application infrastructure, data, artificial intelligence, security and compliance, business process, and collaboration verticals.

Microsoft's Azure AI now has over 20,000 customers, and over 85% of Fortune 100 companies have used this solution in the last 12 months. Microsoft is a trillion-dollar company that is still growing revenue and bottom-line profit at a robust pace, making it an attractive pick for growth investors. 

MSFT Chart

MSFT data by YCharts.

2. Adobe has managed to crush market returns

Adobe (NASDAQ:ADBE) is another large-cap tech stock that has considerably outperformed the broader markets. If you had invested $10,000 in Adobe in December 2009, it would now be valued at roughly $83,840.

Adobe is focused on the digital transformation of companies, which provides it with enough growth opportunities over the next decade. Adobe believes mobile devices and tablets need to be used for creation, not just for consumption. Adobe Lightroom is an end-to-end system for photo editing, and this vertical saw mobile monthly active users grow by 130% year over year in the most recent quarter. 

The company also launched Adobe Fresco, which is a drawing and painting application and is currently available on the Apple iPad, to start. Adobe believes Fresco will be as disruptive as Photoshop in the coming years.

Adobe is now looking to accelerate the transformation of paper to digital processes with the Document Cloud. This product reinvents how customers scan, edit, sign, and share digital documents. The annual recurring revenue for the Document Cloud stands at $993 million, and major customers include Deutsche Bank, Dell, and Saudi Aramco.

Adobe Scan is one of the top document-scanning applications on Alphabet's Android and Apple's iOS. It has around 35 million installs, and downloads rose 30% year over year in the August quarter. Adobe Sign is the company's cloud-based electronic signature solution and continues to gain significant traction among enterprises.

Both are trading at as premium

Investing in tech is risky because of the disruptive nature of the businesses. But both Microsoft and Adobe have enough growth drivers that will push revenue higher over the long term. They have several subscription-based products that will help prevent cyclicality in a downturn. 

Due to their market-crushing returns, the two stocks are trading at a premium valuation. The fears of an upcoming recession and a slowdown in enterprise tech spending will drive these stocks lower, resulting in a sell-off.

But that also presents an opportunity for long-term investors to add to their existing positions and average out their losses.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.