(Adds investor quotes and details throughout, updates prices)

* TSX ends down 20.44 points, or 0.1%, at 21,998.38

* Technology falls 5.4%; Shopify ends nearly 14% lower

* Energy advances 1.4%

* Rogers gains 3.1% after beating earnings estimates

TORONTO, April 20 (Reuters) - Canada's main stock index edged lower on Wednesday as investors weighed the appropriate valuation for some of the high-growth companies that performed strongly during the pandemic, but the market's decline was cushioned by gains for resource shares.

The Toronto Stock Exchange's S&P/TSX composite index ended down 20.44 points, or 0.1%, at 21,998.38, after four straight days of gains.

Still, the TSX has advanced 3.7% since the start of the year, one of the few major global benchmarks to post gains.

"The relative performance of the TSX has been supported by the fact that right now with rising interest rates you are seeing a valuation compression," said Joseph Abramson, co-chief investment officer Northland Wealth Management.

"Those sectors and indices that can show earnings growth that can offset the valuation compression are the ones that will hold up the best."

The Toronto market has a 28% weighting in energy and materials, indicating that the earnings of a large chunk of the Toronto market are directly tied to rising commodity prices.

The energy group rose 1.4%, while financials, which tend to benefit from higher interest rates, added 0.5%.

Canada's annual inflation rate to a 31-year high of 6.7% in March, bolstering expectations for further rate hikes from the Bank of Canada.

In contrast, the technology sector tumbled 5.4%, pressured by a decline of nearly 14% for e-commerce giant Shopify Inc .

Shopify's decline came as it was reported that the company is in talks to buy tech startup Deliverr and U.S. streaming giant Netflix's first drop in subscribers in a decade shook investor confidence in other high-growth companies, fearful they may face similar post-pandemic performance issues.

Among other names, Rogers Communications Inc gained 3.1 after the company beat analysts' average estimate for quarterly profit. (Reporting by Fergal Smith; Additional reporting by Amal S in Bengaluru Editing by Marguerita Choy)