[Users-fr] fscanfMat & fprintfMat

classic Classic list List threaded Threaded
2 messages Options
Eric levillain (Gmail) Eric levillain (Gmail)
Reply | Threaded
Open this post in threaded view
|

[Users-fr] fscanfMat & fprintfMat

BUG: Compared to Scilab 5.3.3, fscanfMat and fprintfMat are very slow under Scilab 5.4.0.


Hello,

I performed some tests on Scilab 5.3.3 and Scilab 5.4.0 with this following script:


***************************

clc;

clear;

A = ones(1000,1000)+0.1;

tic();

fprintfMat("Matrix.txt", A, "%lg");

s1 = toc();

disp(s1);

 

fscanfMat("Matrix.txt", "%lg");

s2 = toc();

disp(s2);

***************************

Output on WIN 7 x64:

On Scilab 5.3.3: s1 = 0.748 and s2 = 2.496

On Scilab 5.4.0: s1 = 1.279 and s2 = 39.812 !!!

***************************

Output on LINUX x64

On Scilab 5.3.3: s1 = 0.594 and s2 = 2.422

On Scilab 5.4.0: s1 = 0.658 and s2 = 2.473

***************************

 

In conclusion, this bug depends on the OS.

 

Do you know why?

 

Sincerely yours

 

Eric


_______________________________________________
users-fr mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users-fr
Adrien Vogt-Schilb Adrien Vogt-Schilb
Reply | Threaded
Open this post in threaded view
|

Re: fscanfMat & fprintfMat

Hi

From Scilab 5.4, there are new, more efficient tools to write and read matrices, those are:
csvRead
csvWrite

Look them in the help

help csvRead
help csvWrite

also have a look to the related commands (csvDefault, csvStringtodouble, and so on)

Do you confirm that these will execute much faster?


On 07/02/2013 11:56, Eric levillain (Gmail) wrote:

BUG: Compared to Scilab 5.3.3, fscanfMat and fprintfMat are very slow under Scilab 5.4.0.


Hello,

I performed some tests on Scilab 5.3.3 and Scilab 5.4.0 with this following script:


***************************

clc;

clear;

A = ones(1000,1000)+0.1;

tic();

fprintfMat("Matrix.txt", A, "%lg");

s1 = toc();

disp(s1);

 

fscanfMat("Matrix.txt", "%lg");

s2 = toc();

disp(s2);

***************************

Output on WIN 7 x64:

On Scilab 5.3.3: s1 = 0.748 and s2 = 2.496

On Scilab 5.4.0: s1 = 1.279 and s2 = 39.812 !!!

***************************

Output on LINUX x64

On Scilab 5.3.3: s1 = 0.594 and s2 = 2.422

On Scilab 5.4.0: s1 = 0.658 and s2 = 2.473

***************************

 

In conclusion, this bug depends on the OS.

 

Do you know why?

 

Sincerely yours

 

Eric



_______________________________________________
users-fr mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users-fr


_______________________________________________
users-fr mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users-fr