[scilab-Users] [SPAM] how to quickly transform a string in a double when my HDD is full?
Allan CORNET
allan.cornet at scilab.org
Wed Feb 29 11:40:16 CET 2012
Hi,
Have you try csv_stringtodouble or csv_textscan ?
stacksize("max")
N=10000;
paf = string(rand(N,1));
tic(),R = csv_stringtodouble(paf);toc()
Allan
De : Adrien Vogt-Schilb [mailto:vogt at centre-cired.fr]
Envoyé : mercredi 29 février 2012 11:33
À : users at lists.scilab.org
Objet : [scilab-Users] [SPAM] how to quickly transform a string in a double
when my HDD is full?
hi
What is the fastest way to transform a column of stringed numbers in
numbers?
It has come to this: I actually write my column in an HDD and then read it
again.
Using the magical csv_readwrite toolblox is paradoxically faster than evstr.
Here goes a fast benchmark:
stacksize("max")
N=10000;
paf = string(rand(N,1));
tic()
hop = evstr(paf)
disp("evstr method "+string(toc()))
tic()
csv_write(paf,TMPDIR+filesep()+"paf")
hop=csv_read(TMPDIR+filesep()+"paf")
disp("using HDD "+string(toc()))
tic()
hop = eval(paf)
disp("eval method "+string(toc()))
evstr method 1.328
using HDD 0.078
eval method 2.094
logical conclusion: Allan, can you tweak csv_readwrite so it writes to and
reads from the RAM ? it would be even faster !
--
Adrien Vogt-Schilb (Cired)
Tel: (+33) 1 43 94 73 77
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120229/75242396/attachment.htm>
More information about the users
mailing list