Yes, in a for loop.. And in some part of code i have nested loops.. Thanks again Stephane for your answer.. ++ Michael
2017-03-02 16:49 GMT+01:00 Stéphane Mottelet <stephane.motte...@utc.fr>: > what is "i" in your example ? Is there a loop somewhere ? Matlab will be > obviously better for this kind of explicit loop because it uses JIT > compilation. > > S. > > Le 02/03/2017 à 16:41, Michael Benguigui a écrit : > > Sorry .. for sure! (and thank you for your quick answer) > Scilab 6.0.0 > > ++ > Michael > > 2017-03-02 16:33 GMT+01:00 Stéphane Mottelet <stephane.motte...@utc.fr>: > >> Hello, >> >> Can you precise your Scilab version ? 5.5.2 ? 6.0.0 ? Or another one... >> >> S. >> >> Le 02/03/2017 à 16:29, Michael Benguigui a écrit : >> >> Hi all, >> As a Scilab user, I am currently fighting to reach Matlab performance..My >> current scilab program takes 4x more than my matlab's vesion. Here are some >> instructions requiring some optimizations.. If you have an idea... thanks a >> lot! >> >> All times are cumulative times after the execution (iterations) >> I used the Matlab and Scilab profilers >> tooth_psi_angle is a 70000x4 2D matrix of real numbers >> tool.forces.cutting_forces_teeth_TCS is a 72000x4x3 matrix of real >> numbers >> process.fz is a scalar >> tool.kappa is a scalar >> >> if tool_angle(i) < tool.pitch_angle then >> h_total(i) = process.fz * sin(tooth_psi_angle(i,tooth)) * >> sin(tool.kappa); >> >> => Matlab:<0.01s vs Scilab 4.8s >> >> ROT_LCS_TCS =[-cos(tooth_psi_angle(i,tooth)) >> -sin(tool.kappa)*sin(tooth_psi_angle(i,tooth)) >> -cos(tool.kappa)*sin(tooth_psi_angle(i,tooth)); >> sin(tooth_psi_angle(i,tooth)) -sin(tool.kappa)*cos(tooth_psi_angle(i,tooth)) >> -cos(tool.kappa)*cos(tooth_psi_angle(i,tooth)); 0 cos(tool.kappa) >> -sin(tool.kappa)]; // result is a 3x3 matrix >> >> => Matlab:0.67s vs Scilab 4s >> >> tool.forces.cutting_forces_teeth_TCS(i,tooth,:) = ROT_LCS_TCS*[ft;fr;fa]; >> >> => Matlab:0.55s vs Scilab 1.3s >> >> Regards >> Michael >> >> >> _______________________________________________ >> users mailing >> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users >> >> -- >> Département de Génie Informatique >> EA 4297 Transformations Intégrées de la Matière Renouvelable >> Université de Technologie de Compiègne - CS 60319 >> 60203 Compiègne cedex >> >> _______________________________________________ users mailing list >> users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users > > -- > Michael Benguigui, Activeeon +33 6 304 37 37 0 https://fr.linkedin.com/in/ > micha%C3%ABl-benguigui-23a85921 skype: michael.bengui...@hotmail.fr > > _______________________________________________ > users mailing > listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users > > -- > Département de Génie Informatique > EA 4297 Transformations Intégrées de la Matière Renouvelable > Université de Technologie de Compiègne - CS 60319 > 60203 Compiègne cedex > > > _______________________________________________ > users mailing list > users@lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -- Michael Benguigui, Activeeon +33 6 304 37 37 0 https://fr.linkedin.com/in/micha%C3%ABl-benguigui-23a85921 skype: michael.bengui...@hotmail.fr
_______________________________________________ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users