Tech stocks took a hit after a Goldman Sachs analyst questioned this year's run-up in the industry's five biggest names -- Apple, Microsoft, Amazon, Facebook and Alphabet -- the parent company of Google.

The Nasdaq, which hit an all-time high Friday morning, fell nearly 2% by the end of the day. The tech wreck put a dent in the performance of the Dow, which includes Microsoft (MSFT) and Apple (AAPL), and the S&P 500.

The Dow and S&P had also hit records earlier as investors shrugged off worries about the British election and about fired FBI director James Comey's testimony on President Trump and Russia.

But the market resilience was replaced by worries that the tech sector could be due for a collapse.

Goldman Sachs analyst Robert Boroujerdi took a close look at the Nasdaq's five leading stocks and compared their recent performance with how other big tech stocks fared during the bubble period of 1999 and early 2000.

His verdict?

Giant tech companies today are cheaper than their counterparts were 17 years ago, a time when the biggest names included Cisco (CSCO), Oracle (ORCL), Intel (INTC) and Lucent (now part of Nokia (NOK)), as well as Microsoft.

Facebook (FB), Amazon (AMZN), Apple, Microsoft and Google (GOOGL) -- which Boroujerdi dubbed FAAMG -- also have more cash and are generating greater cash flow than the leaders from 2000.

(FAAMG is not to be confused with FANG, which many traders still use as a fun acronym to describe four top techs. They swap out Apple and Microsoft and add either Netflix (NFLX) or chip giant Nvidia (NVDA).)

But Boroujerdi is concerned that today's tech leaders aren't as profitable as their counterparts from 2000.

Another worry: The biggest five techs have an outsized impact on the overall market, just as tech leaders did in 2000.

Related: Dow hit new record high in the midst of the Comey hearing

The top five techs today account for 13% of the market value weighting in the S&P 500, even though they are only 1% of the companies in the index. The top five techs made up about 16% of the S&P 500 in 2000.

"The recent run in large-cap tech stocks has evoked memories (nightmares?) for some investors of the last euphoric NASDAQ run," Boroujerdi wrote.

The good news is that techs are financially healthier than they were in 2000, thanks in large part to all that cash. And Boroujerdi acknowledged that the stocks are much cheaper now than they used to be.

Still, investors hit the panic button Friday. Apple was down 4%. Amazon, Google and Facebook each fell about 3%. Microsoft dipped 2%.

Netflix and Nvidia, which was the top performer in the S&P 500 in 2016 and has surged again this year, dropped 5% and 6.5% respectively.

All these stocks are still up sharply this year, mainly because of strong earnings growth.

So it remains to be seen whether the selloff is a classic case of bored traders grasping at straws on a sleepy almost-summer Friday or the beginning of a correction -- or, worse, another bear market -- for the tech sector.