write_data spends too much time to create file.



Dear Leo:
Here the results of your suggestion:

%i1) showtime:true $
Evaluation took 0.0000 seconds (0.0000 elapsed) using 32 bytes.
(%i2) array(new,1000,1) $
Evaluation took 0.0000 seconds (0.0000 elapsed) using 8.164 KB.
(%i3) for a:0 thru 1000 step 1 do (new[a,0]:a,new[a,1]:a+1) $
Evaluation took 0.0100 seconds (0.0100 elapsed) using 579.039 KB.
(%i4) write_data(new,"new.dat");
Evaluation took 0.1100 seconds (0.1100 elapsed) using 7.901 MB.

%i5) build_info();

Maxima version: 5.21.1
Maxima build date: 21:4 7/30/2010
Host type: x86_64-unknown-linux-gnu
Lisp implementation type: CMU Common Lisp
Lisp implementation version: Snapshot 2010-07 (20A Unicode)

Thank you very much.
Morales

On Fri, 30 Jul 2010, Leo Butler wrote:

>
>
> On Thu, 29 Jul 2010, Alejandro Morales wrote:
>
> < 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.
>
> You can see that Maxima reports it took 0.096 sec to evaluate the last
> command, but that 38.175 sec elapsed. I think this indicates that the
> slowdown is occuring while writing.
>
> Perhaps someone with a 64bit system could check this.
>
> Could you try another lisp, say Maxima built with cmucl lisp, to
> see if this problem is particular to clisp?
>
> Leo
>
> <
> < 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
> <
>
>
>
> -- 
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>