Shares of the VanEck Semiconductor ETF (SMH -0.33%) rallied 12.3% in May, according to data from S&P Global Market Intelligence.

VanEck's ETF is one of the more popular ways to gain diversified exposure to the semiconductor sector, with a relatively low expense ratio of 0.35%. The ETF holds 26 of the largest semiconductor stocks in the market, and is weighted by market cap.

After a torrid start to the year, the exchange-traded fund took a slight dip in April. However, May saw the fund increase 12.3%, on the back of outperformance once again from its largest component: Nvidia.

Nvidia impresses even amid high expectations

As of today, Nvidia is the largest weighting in the VanEck Semiconductor ETF, at 20.6%. And Nvidia had a great May, up 26.9%, with most of the gains occurring after the company held its first-quarter earnings release and conference call on May 22. Nvidia managed to beat even Wall Street expectations, despite them already being sky-high, with revenue up 262% on the back of 427% growth in its data center segment. In addition, management announced a 10-for-1 stock split and raised its dividend by 150%.

All in all, Nvidia's earnings not only reinforced its position as the clear leader in the artificial intelligence revolution with a huge lead over rivals, but actually may have provided even more optimism.

Other large semiconductor stocks had a good month as well. Most notably outside Nvidia, Qualcomm, which is the fifth-largest weighting in the ETF, rallied 23% in May on the back of its own strong earnings report. Qualcomm dominates modem chips for mobile handsets, and the all-important Chinese Android market showed signs of turning around in the first quarter. In addition, investors may be increasingly enthusiastic about Qualcomm's new Snapdragon X Elite and X Plus processors for AI PCs, which the company just introduced and which will go into Windows-based PC models this year.

Gaining any sort of meaningful market share in the PC market would be incremental to Qualcomm's existing business, which is highly concentrated in smartphones, giving the company another avenue for growth.

This ETF belongs in every young investor's portfolio

While the semiconductor sector can be highly volatile and cyclical, remember that it's a growth-cyclical industry. In fact, the semiconductor sector has been the best-performing sector over the past decade.

So while investors should expect big drawdowns from time to time, May was yet another reminder that the chip sector is driving the most cutting-edge innovation in the world today.