No one knows which company will be the top-performing artificial intelligence (AI) stock over the next five years. We're about two-and-a-half years into the AI arms race, and few could have predicted what has transpired, let alone what will happen over the next few years.

However, one company that was projected to be an early winner of the AI arms race has justified that prediction: Nvidia (NASDAQ: NVDA). Nvidia makes graphics processing units (GPUs) that are widely used to train AI models, but there could be a shift occurring. Nvidia's dominance allows it to charge top dollar for its computing hardware, and some of its clients are fed up.

Now, an alternative to GPUs is emerging, and this company could be a massive winner over the next five years. The company? Broadcom (AVGO 0.83%). I believe that Broadcom is positioned to grow massively over the next few years and could be the top AI investment if its management team realizes its goals. Here's why.

AI robot watching a stock chart go up.

Image source: Getty Images.

Broadcom's XPUs could take market share from Nvidia

Broadcom is a massive company boasting various software programs and mainframe computers. The area I'm most excited about is its custom AI accelerators, which it calls XPUs. GPUs have incredible flexibility: They can train AI models, mine for cryptocurrency, or look for new drugs, among many other uses. These workloads are all processed by a GPU differently. But what about a GPU that does nothing but run an AI model?

That's the idea behind the XPU, which is specifically designed for the way a client wants to train its AI model. This specialization allows XPUs to outperform GPUs. Because XPUs are designed in a collaboration between an end client and Broadcom, there isn't as much profit cushion built into the product, which makes them more cost-effective than GPUs.

However, the true savings are unknown because these XPUs aren't available for public purchase. Nvidia's profit margin was 56% during its last quarter, which makes it fairly obvious that they're making a ton of money from its GPUs.

The market potential for XPUs is huge and rapidly expanding

Currently, Broadcom has three XPU customers. The company expects that the addressable market for this client group will reach $60 billion to $90 billion by fiscal 2027. In addition, Broadcom has two clients that are on track to finish their XPU designs by the end of the year, and two more AI hyperscalers have selected Broadcom as a partner to create their own XPUs. In total, that will be seven customers on track to have Broadcom-designed XPUs in the near future.

Clearly, there's good interest in this technology, and Broadcom's revenue is set to expand dramatically because of it. In fiscal 2023, Broadcom's AI revenue was $3.8 billion. In fiscal 2024, its AI revenue was $12.2 billion. Total revenue over the past 12 months was $54.5 billion, so if it can maintain its growth trajectory, its AI revenue could dramatically expand over the next few years.

This is why Broadcom is my dark horse pick to be the best-performing AI stock over the next five years, but is there anything that might limit its upside?

Broadcom carries a premium valuation over Nvidia

Even the best investments can be a mistake at the wrong prices. The market already knows everything I laid out above and has chosen to give Broadcom a premium price tag as a result.

AVGO PE Ratio (Forward) Chart

AVGO PE Ratio (Forward) data by YCharts

Broadcom trades for 35 times forward earnings, more than Nvidia's 32 multiple. This indicates that the market believes Broadcom's outlook is a bit better than Nvidia's, even though Broadcom hasn't proved it yet. Still, Broadcom's companywide revenue is growing much more slowly than Nvidia's.

NVDA Operating Revenue (Quarterly YoY Growth) Chart

NVDA Operating Revenue (Quarterly YoY Growth) data by YCharts

With Broadcom trading at a higher valuation, the market expects that Broadcom will grow faster eventually, although it's unclear when. If that doesn't happen, and Broadcom trudges along at a growth rate of about 25%, it may not be the best AI investment over the next five years. But if its XPU business starts to take off, I like Broadcom's chances of being the best-performing AI stock over the next five years.