Subject: write_data spends too much time to create file.
From: Alejandro Morales
Date: Thu, 29 Jul 2010 14:08:15 -0500 (CDT)
Dear Leo:
My output is:
showtime:true $
array(new,1000,1) $
for a:0 thru 1000 step 1 do (new[a,0]:a,new[a,1]:a+1) $
write_data(new,"new.dat");
Evaluation took 0.0000 seconds (0.0000 elapsed) using 40 bytes.
Evaluation took 0.0000 seconds (0.0000 elapsed) using 16.008 KB.
Evaluation took 0.0880 seconds (0.0896 elapsed) using 1.131 MB.
Evaluation took 0.0960 seconds (38.1753 elapsed) using 1.988 MB.
build_info();
Maxima version: 5.21.1
Maxima build date: 20:45 6/2/2010
Host type: x86_64-unknown-linux-gnu
Lisp implementation type: CLISP
Lisp implementation version: 2.44.1 (2008-02-23) (built 3465369225)
(memory 3484518319)
Evaluation took 0.0000 seconds (0.0006 elapsed) using 38.320 KB.
Where the problem is?
Thanks: Morales
On Thu, 29 Jul 2010, Leo Butler wrote:
>
>
> On Wed, 28 Jul 2010, Alejandro Morales wrote:
>
> <
> < File "new.dat" is created with the following instructions:
> <
> < (%i1)array(new,1000,1);
> < (%i2) for a:0 thru 1000 step 1 do (new[a,0]:a,new[a,1]:a+1);
> < (%i3) write_data(new,"new.dat");
> <
> < After finishing the "for", "write_data" spends 37 seconds to write the file
> < "new.dat".
> < Is there a way to do the job faster?
> < Thanks:Morales
>
> I don't see this problem:
>
> showtime:true $
> array(new,1000,1) $
> for a:0 thru 1000 step 1 do (new[a,0]:a,new[a,1]:a+1) $
> write_data(new,"new.dat");
>
> Evaluation took 0.0000 seconds (0.0000 elapsed) using 8 bytes.
> Evaluation took 0.0000 seconds (0.0000 elapsed) using 8.398 KB.
> Evaluation took 0.0600 seconds (0.0600 elapsed) using 579.039 KB.
> Evaluation took 0.2300 seconds (0.2300 elapsed) using 2.836 MB.
>
> build_info();
>
> Maxima version: 5.21.1
> Maxima build date: 20:11 5/9/2010
> Host type: i686-pc-linux-gnu
> Lisp implementation type: CMU Common Lisp
> Lisp implementation version: CVS 19d 19d-release (19D)
>
> Leo
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>