Hi, On 12/30/2016 2:56 PM, Filippo giacchè wrote: I m trying to optimize ScInterpreter::ScGCD and ScInterpreter::ScLCM (in /core<http://opengrok.libreoffice.org/xref/core>/sc<http://opengrok.libreoffice.org/xref/core/sc>/source<http://opengrok.libreoffice.org/xref/core/sc/source>/core<http://opengrok.libreoffice.org/xref/core/sc/source/core>/tool<http://opengrok.libreoffice.org/xref/core/sc/source/core/tool>/interpr5.cxx<http://opengrok.libreoffice.org/xref/core/sc/source/core/tool/interpr5.cxx>) as mentioned in bug tdf#89387.. From what I understood , these function are not optimal in the matrix case (evenif the algorithms look good in my opinion) and need to be changed. So my question is how can I do it? If I create function in /core/sc/source/core/tool/ScMatrix.cxx that take as input a matrix and retuns the GCD(or LCM) I'll do ok?or is not the right way to proceed? thanks ,I welcome any advice that you can give me. I would suggest you to suggest your vision as a change posted to gerrit for review, and let others to discuss the implementation: that could be much more productive IMO. If I'm wrong, I hope others will correct me. -- Best regards, Mike Kaganski