The Nasdaq Composite index vaulted above 8000 for the first time Monday, underscoring the dominant role megacap technology shares have played in propelling the U.S. stock market past its global peers this year.

It took the index just short of eight months to climb a thousand points after crossing 7000 in January—a pace unmatched since around the height of the dot-com era, when the Nasdaq jumped from 4000 to 5000 in just 49 trading days.

Before...