In reply to Zhenhuan Hu.

Yes. The elementwise product will be much faster, as discussed in the article "Never multiply with a large diagonal matrix."