For years, Apple has been the top dog. But, as they say, the times are a-changin'.

iPhones are old news. Unit sales of the devices have leveled off after years of growth. What's more, the company is now embroiled in an antitrust case with the U.S. Department of Justice that could last years and cost millions -- or billions -- in legal costs and fines.

The time may finally be here for investors to look elsewhere for outperformance. Let's have a look at two artificial intelligence (AI) stocks that could be suitable portfolio replacements for Apple.

A semiconductor with AI written on it.

Image source: Getty Images.

1. Microsoft

First up is Microsoft (MSFT -1.00%). In the decades-old battle between Microsoft and Apple, Microsoft has taken the upper hand in recent months as its market cap has once again surpassed its rival.

In part, that's down to Microsoft's competitive advantages in the field of AI. The company has several AI initiatives that are already bearing fruit.

Microsoft is leaning into the AI chatbot craze with its Copilot assistant. With its ability to generate images, compose emails, code, and shop, Microsoft is hoping Copilot can become many people's "everyday AI companion."

The company's close partnership with ChatGPT-maker OpenAI puts Microsoft on the front lines of AI innovation. One year ago, after ChatGPT took the world by storm, Microsoft integrated some ChatGPT features into its Office software suite -- quickly capitalizing on the buzz.

Finally, thanks to Microsoft's large cloud services business, the company should expect to benefit from the growth of the overall AI market. As AI start-ups look to scale their models, they will turn to Microsoft -- which, as the No. 2 cloud services provider, controls many of the high-performance computers needed to run the latest and greatest AI models.

Microsoft has several ways to win as the AI revolution rolls on. Accordingly, it may be time for investors to load up on Microsoft and leave Apple behind.

2. Super Micro Computer

Yes, it's true: Super Micro Computer's (SMCI 3.84%) stock is up more than 800% in a year.

However, that incredible outperformance shouldn't scare off long-term investors. Here's why: Super Micro Computer's overall business model is straightforward. The company makes the physical hardware that holds and cools the enormously complex -- and expensive -- graphics processing units (GPUs) that power the most complex AI models.

In other words, Super Micro Computer is rolling like an ice cream shop in the middle of a heatwave.

Granted, that boom won't last forever. However, it could last a lot longer than many think. That's because the overall GPU market is expected to grow 10 times from 2022 through 2032. What's more, those estimates might actually be too conservative. Some industry insiders think the market might grow from $40 billion to $400 billion by 2027, not 2032.

Either way, there is an avalanche of demand for high-powered GPUs, and consequently, for the server racks to house them.

That's why analysts expect Super Micro Computer's total sales to skyrocket from $7.1 billion to $14.6 billion this year. By 2025, Wall Street expects sales to surpass $20.7 billion.

For long-term investors looking for a growth stock with serious legs, Super Micro Computer is a name to consider.