Intel (INTC -0.29%) may be unrivaled in the tech sector in its underperformance in recent history. Over the last 10 years, the stock is down 26% even as many of its semiconductor peers and the "Magnificent Seven" have delivered monster returns.

Intel's recent earnings report highlighted the company's multiple challenges as new CEO Lip-Bu Tan has embarked on a massive right-sizing campaign. The company has already laid off 15% of its workforce. It's spinning off its networking and edge business, turning Intel into a stand-alone company that can take on outside investment. It's also taken more impairments for equipment that's no longer useful.

That's all part of Tan's strategy of refocusing the business on core priorities like AI, its x86 CPU franchise, and the launch of a foundry for its 18A process.

Some investors continue to bet on Intel's eventual turnaround, but the latest report shows that's likely to take longer than investors had hoped. Instead of buying Intel, investors are better off buying these two stocks that are capitalizing on the company's struggles.

An AI chip connected to others with circuits.

Image source: Getty Images.

1. Advanced Micro Devices

While Intel has struggled over the last decade, Advanced Micro Devices (AMD 1.15%) has emerged as a winner, grabbing market share from Intel in the PC-focused client segment.

It's also proven itself to be more nimble, shedding its foundry business to become a fabless designer, and it's emerged as the closest challenger to Nvidia in AI graphics processing units (GPUs), though it's a distant second behind the leader. AMD has made several acquisitions of start-ups in AI to bolster its product offerings and make it more competitive.

AMD is also growing much faster than Intel, showing it's capitalizing on the AI boom. It hasn't reported second-quarter results yet, but in its first quarter, revenue rose 36% to $7.44 billion, driven by its success in both the data center, where revenue jumped 57% to $3.7 billion, and in the client segment, where revenue jumped 68% to $2.3 billion on the strength of its Zen 5 Ryzen processors.

By contrast, Intel reported a 3% revenue decline in its client segment to $7.9 billion. As those numbers show, Intel is still the leader in PC chips, but AMD is rapidly gaining market share. The client segment is also Intel's biggest, making up nearly half of its revenue before intersegment eliminations.

Finally, AMD is in a strong position because it has healthy franchises in both central processing units (CPUs) and GPUs, which should benefit it in the AI era.

2. TSMC

In the foundry business, Intel's primary competitor is TSMC (TSM 0.66%), or Taiwan Semiconductor Manufacturing. In fact, it's not a close competition at this point as Taiwan Semiconductor makes up more than half of the contract chips in the world and roughly 90% of advanced chip production in the world, even manufacturing advanced chips for Intel.

Intel has aspirations of challenging TSMC in the contract business, but at this point, the legacy chip maker is far behind, and it will take years for that strategy to materialize.

In the meantime, Taiwan Semiconductor continues to post blistering growth. In Q2, it reported 44.4% revenue growth in U.S. dollars to $30.1 billion, and profits have soared as well, as earnings per share jumped 60.1% to $2.47.

Thanks to its dominance of the contract foundry business and relationships with tech giants like Nvidia and Apple, TSMC enjoys huge operating margins, which came in at 49.6% in Q2. By comparison, Intel is struggling to turn a profit.

TSMC now makes most of its revenue from advanced chips, which it defines as 7 nanometers (7nm) or less. That strength in advanced chips also positions it to continue to take advantage of growth in AI.

Considering its growth rate, TSMC's valuation also looks attractive at a price-to-earnings ratio of 29. As rivals like Intel and Samsung have faltered, TSMC's leadership position has become even more dominant. The stock looks set to continue being a winner.