Taiwan Semiconductor Manufacturing (TSM -0.69%) has attracted a lot of attention as the global chip shortage has worsened over the past two years. As the world's largest and most advanced contract chipmaker, TSMC is a linchpin of the semiconductor sector, and the chip shortage probably won't end until it significantly increases its capacity.

However, TSMC's smaller Taiwanese rival, United Microelectronics (UMC -0.99%), attracts a lot less attention. That's probably because UMC manufactures larger and older chips instead of the cutting-edge ones that dominate TSMC's manufacturing plants.

A silicon wafer being manufactured.

Image source: Getty Images.

Over the past 12 months, UMC's stock price has rallied nearly 120% as TSMC's stock price advanced about 30%. Over the past five years, UMC's stock price skyrocketed nearly 480% as TSMC's stock rose about 250%.

Have investors been paying attention to the wrong Taiwanese chip foundry all this time?

The key differences between TSMC and UMC

TSMC controlled 52.9% of the pure wafer foundry market in the second quarter of 2021, according to TrendForce. Samsung ranked second with a 17.3% share, followed by UMC with a 7.3% share.

TSMC manufactures chips of all sizes, but it generated 49% of its revenue from its smallest 5nm and 7nm nodes in its most recent quarter. TSMC and Samsung are the only two foundries that manufacture 5nm and 7nm chips, but TSMC's chips have a higher transistor density than Samsung's -- which makes its manufacturing process the most advanced in the world.

That's why the world's top fabless chipmakers, including Advanced Micro Devices, Apple, and Qualcomm, all outsource their highest-end chips to TSMC. That's also why there's a major traffic jam at TSMC's plants.

UMC doesn't manufacture any chips beyond the 14nm node. Three years ago, it abandoned its efforts to develop smaller chips and focused on manufacturing less advanced chips for the automotive and Internet of Things (IoT) markets instead. UMC noted that developing more advanced chips would be too capital-intensive and that its market opportunity was smaller than its market for older chips.

UMC has the capability to manufacture 14nm chips, but it isn't generating any meaningful revenue from that higher-end node yet. Instead, it generated 58% of its revenue by manufacturing 65nm, 40nm, 28nm, and 22nm chips last quarter, while the rest came from even older nodes.

UMC's plants have been operating at maximum capacity this year, but it faces less pressure to aggressively build new plants like TSMC because other foundries -- like GlobalFoundries and China's SMIC -- can also manufacture comparable chips for the automotive and IoT markets.

Which company is growing faster?

TSMC's revenue grew 4% in 2019 and jumped 25% in 2020, and analysts expect its revenue to rise 18% this year. They expect its revenue to grow another 18% in 2022 as the chip shortage drags on.

UMC's operating revenue declined 2% in 2019 as it retreated from higher-end chips. But its revenue rose 19% in 2020 as demand for its mid- to lower-end chips accelerated, and analysts anticipate 18% sales growth this year followed by 10% growth in 2022.

UMC's underlying technologies and revenue growth rates are less impressive than TSMC's, but its shift toward lower-end nodes enabled it to generate stronger earnings growth. TSMC's net income increased 50% in 2020, but UMC's net income nearly tripled.

Analysts expect TSMC's net income to rise 12% this year, even as it starts executing an ambitious three-year $100 billion plan to boost its capacity. But they expect UMC's net income to more than double this year as it maintains stable capex levels and avoids the spending war between TSMC and Intel (INTC 1.36%), which has set an ambitious goal of reclaiming its lead in the process race from TSMC by 2025.

The tortoise or the hare?

TSMC is still growing rapidly, but it's paying a high price to maintain its lead against Samsung and Intel. UMC is also generating robust growth, but it's maintaining a lower profile, serving lower-end markets, and isn't allocating tens of billions of dollars toward the construction of new cutting-edge plants.

TSMC's stock looks reasonably valued at 21 times next year's earnings, but UMC trades at just 13 times next year's earnings -- even though it's already outperformed its larger rival over the past 12 months.

UMC is essentially the tortoise of the foundry sector to TSMC's hare. Both of these companies are still sound long-term investments in the semiconductor sector, but I believe UMC's more conservative approach will enable it to generate bigger gains than TSMC for the foreseeable future.