Speed up matVecModM function.
Merge pull request #1759 from MarcCote/speedup_MRG_init

Speed up matVecModM function.