NEW YORK — Technology stocks are trending big-time as investors latch on to innovative companies racing ahead in a slow-growth world.

The tech-heavy Nasdaq is the best performing major U.S. stock index this year, gaining 6.6 percent as the Standard & Poor’s 500 and the Dow Jones Industrial averages have wavered between small gains and losses.

The industry has re-established itself as the dominant sector in the U.S. stock market and currently accounts for 20 percent of the value of the S&P 500 index. That is tech’s largest share since the dot-com bubble.

But the sector’s success isn’t universal. Some of the most recent earnings reports from big tech companies have highlighted both the good and the bad for the industry. Here’s a look at the trends, both positive and negative.

STILL ROOM TO GROW

The economy is still expanding, but at a tepid pace. Tech companies, however, are generating rapidly rising sales and profits as they disrupt older industries. And that is drawing in investors.

Many think the Internet boom that ended in 2000 was just the first leg in a wave of technology growth.

“The global digital economy is in its infancy. It’s still being constructed,” says Joe Quinlan, chief market strategist at U.S. Trust in New York. “So we have tremendous upside when it comes to social media, e-commerce, retailing, you name it.”

SURPRISINGLY AFFORDABLE

Despite its run-up, the sector is not that pricey. In fact, tech stocks are trading at a slight discount to the market.

The average price-earnings ratio, a measure of how much investors are willing to pay for each dollar of earnings, is 16.2 for tech companies in the S&P 500. That is below the 16.5 ratio for the entire index, meaning that tech as a group is fractionally cheaper than the overall market.

“I don’t see a valuations bubble,” says Jeremy Zirin, head of investment strategy at UBS Wealth Management in New York. “It’s not that there isn’t froth in some areas, it’s just not that pervasive.”

Even after a 19-fold increase in the price of Apple’s stock during the past decade, it’s difficult to argue that it costs too much. The P/E for Apple’s stock is 12, considerably less than the average tech company and the overall market.

Businesses are still moving to the Internet and increasing their spending on advertising, trends that are far from over, says Matt Peron, managing director of global equity at Northern Trust, an asset manager. Those trends should benefit Google, the dominant force in online search and marketing.

That outlook, combined with a reasonable valuation, makes Google an attractive stock to own, he says. The company’s P/E is 20.7, above the average for the S&P 500, but not excessively so.

WATCH OUT FOR FROTH

Investors may be getting carried away with the prospects for some stocks. Netflix is an example. The company has been on an incredible run. Since bottoming out at a split-adjusted $7.54 in August 2012, the stock has soared 16-fold to peak at $126.45 on Aug. 6.

Netflix has added 38 million subscribers around the world during the past three years while expanding into dozens of countries. It’s solidified its position as the leader in streaming video. But investors are paying a high price for that growth. The P/E on the stock has jumped to 427 this year.

If those lofty expectations for earnings growth are not met, an uncomfortable adjustment could follow.

Twitter’s stock, for example, has lost almost half its value from a peak in October as the company struggles to satisfy investors’ demands for revenue and user growth. And online business review company Yelp has dropped 70 percent since its September high as it grapples with the market’s expectations.

BEWARE OVERSEAS EXPOSURE

Tech is the most exposed of all the S&P 500 sectors to demand from overseas.About 60 percent of the sector’s revenue comes from abroad, according S&P Dow Jones Indices.

As a result, earnings in the group will be hit if the dollar continues to strengthen.