[Scilab-users] mfscanf vs fscanfMat
Rafael Guerra
jrafaelbguerra at hotmail.com
Sun Oct 16 13:17:06 CEST 2016
Fyi, if you run the previous code in order to compare the first two methods on an ASCII file with 1 million lines of input data, then the results are (had to increase stacksize on my laptop):
t1 = 206.015 // r=mfscanf() --> mlist
t2 = 13.8685 // M=fscanfMat() --> matrix
i.e., the mfscanf solution seems to become rather slow for very large files (taking about 3.5 minutes in this last test).
Why is it much slower than fscanfMat?
Regards,
Rafael
-----Original Message-----
From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon
Sent: Saturday, October 15, 2016 11:00 PM
To: Users mailing list for Scilab <users at lists.scilab.org>
Subject: Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat
Hello Rafael,
Le 15/10/2016 20:49, Rafael Guerra a écrit :
> .../...
>
> The results for a 50,000-lines input ASCII file are:
> time1= 0.686404 // mfscanf
> time2= 0.499203 // fscanfMat
> time3= 35.3966 // csvRead
.
Thanks for these very convincing results.
I thought that evstr() is vectorized because it is so on my PC, after
having worked on it.
But a trivial improvement was still unsubmitted.
Repaired: https://codereview.scilab.org/#/c/18586/
Despite this improvement fasten evstr() by a factor > 10, this is not
enough to reach mfscanf()'s speed.
BR
Samuel
More information about the users
mailing list