Buying and holding great companies for a really long time is one of the best ways to make a fortune as it allows you to utilize the power of compounding. However, investors need to be savvy enough to ensure that they choose the right stocks to hold for the long haul.

Advanced Micro Devices (AMD 1.36%) and Micron Technology (MU 2.20%) are two such stocks that have turned out to be terrific investments over the past decade, crushing the broader market's returns by miles.

AMD Chart

AMD data by YCharts

It wouldn't be surprising to see these tech stocks repeat their outstanding performance once again thanks to a new set of catalysts that could drive multi-year growth. Let's look at the reasons why AMD and Micron could be solid picks for investors aiming to buy great companies to hold for a long, long time.

Man and woman looking at a laptop screen.

Image source: Getty Images

1. Advanced Micro Devices

AMD's growth has been powered by robust demand for its chips, which are used in data centers, computers, and gaming consoles. These markets are likely to keep driving AMD's growth for a long time to come, and there are emerging catalysts that could complement its existing growth drivers.

For instance, AMD is going to provide the building blocks of Meta Platforms' (META 0.14%) metaverse. Meta has decided to use AMD's server processors in its data centers, which could unlock a massive opportunity for the chipmaker since the social media giant has decided to invest billions of dollars into its metaverse initiative in the coming years, including some $10 billion this year alone.

That's not so surprising as the size of the metaverse is expected to increase at an annual pace of 43% through 2028, hitting nearly $829 billion in value, according to market research company Emergen Research. And this is not the only budding growth driver for AMD's stock.

The chipmaker is finding traction in the automotive market as well. Electric vehicle (EV) giant Tesla is reportedly using AMD's chips to power the in-car infotainment system in its Model Y lineup in China. It is worth noting that AMD's chips were already inside the infotainment systems of the Model S and Model X vehicles. Thanks to the addition of new factories, the potential increase in Tesla's production capacity is likely to further increase AMD's addressable market in the automotive space.

What's more, AMD's strong relationship with Tesla could also encourage other automakers to adopt its automotive chips. AMD seems to be gaining ground and expanding its automotive design wins, CEO Lisa Su pointed out on the company's October earnings conference call. Allied Market Research estimates that the global in-car infotainment system market could be worth $37.5 billion by 2028, which means that AMD has another multibillion-dollar opportunity that it can seize.

As such, it is not surprising to see why analysts are expecting AMD's earnings to grow at an annual rate of 35% for the next five years. And the new opportunities could help the company sustain an impressive growth rate even beyond that period.

Given that AMD is trading at 44 times earnings right now -- a discount to its five-year, average price-earnings (P/E) multiple of 114 -- investors looking to get into a growth stock for the long haul may want to take a closer look at this chipmaker now.

2. Micron Technology

Computer-memory specialist Micron Technology is expected to see a massive boom in demand for its DRAM (dynamic random access memory) and NAND (short for "not and") flash chips thanks to the huge amount of data that's being generated by such applications as connected cars, the Internet of Things, cloud gaming, and other uses.

By one estimate, the volume of data created, copied, captured, and consumed globally could rise to 180 zettabytes in 2025 from an estimated 64 zettabytes last year. (If you don't know -- and not to worry if you don't -- a zettabyte is equivalent to a billion terabytes. Basically, it's A LOT.) As a result, the installed base of data storage capacity is expected to increase at an annual pace of 19% through 2025. Plus, the DRAM market is also sitting on notable tailwinds, such as 5G smartphones and increasing data center needs.

These factors are expected to send the DRAM market's revenue to $100 billion in 2025, followed closely by the NAND flash market, which is expected to clock $90 billion in revenue. TrendForce points out that Micron held 25% of the global DRAM market in the third quarter, up four percentage points from the previous quarter. Meanwhile, the chipmaker reportedly holds an 11% share in the NAND flash market.

Micron's robust market share in memory has translated into terrific growth for the company. Its revenue increased 29% year-over-year in fiscal 2021 to $27.7 billion while adjusted earnings jumped to $6.06 per share from $2.83 per share in the preceding year. Analysts expect Micron to achieve a 15%-plus revenue growth rate for the next couple of fiscal years while earnings are expected to increase at 22% a year for the next five years.

With Micron stock trading at just 16 times trailing earnings and 9 times forward earnings, investors are getting a great entry point into a stock that could keep crushing the market in the long run as it has done over the past decade. That's way cheaper than the S&P 500's forward multiple of 21 by a wide margin. All this makes Micron an ideal pick for investors looking to invest in a company with solid upside potential without paying through their noses.