New Delhi, Oct. 25 -- So much for the so-called SaaSpocalypse.

Shares of large software-as-a-service companies, such as cybersecurity firms CrowdStrike and Palo Alto Networks-a Barron's stock pick in June-were among the top-performing stocks in the S&P 500 this week, with each surging more than 10% during a volatile couple of days for the tech sector and broader market. Elsewhere in the software sector, ServiceNow and Workday each also rose more than 10%.

Meanwhile, chip stocks got crushed. Semiconductor equipment company Lam Research plunged 13% this week after warning of supply constraints. It's another sign that the landscape for winners and losers in the artificial-intelligence trade is constantly shifting. Several other semiconduct...