[SPAM] how to quickly transform a string in a double when my HDD is full?

Adrien Vogt-Schilb vogt at centre-cired.fr
Wed Feb 29 11:33:07 CET 2012


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/510552d9/attachment.htm>


More information about the users mailing list