
Signature
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
>>>>> Hi,
>>>>>
[quoted text clipped - 31 lines]
>
> Helmut.
I forgot, whether there is a really efficient way (IIRC it is
something like 'WriteMatrix' or so ...):
Digits:=18; # to have full length for floats
fName:="D:\\temp\\tst.txt";
A:=Array(1 .. 511^2, 'i -> evalhf(1/i)', datatype=float[8]);
fd := fopen(fName,WRITE,TEXT);
st:=time():
writedata(fd,convert(A,listlist));
time() - st;
fclose(fd);
needs about 8.5 sec and reading needs twice the time:
fd := fopen(fName,READ,TEXT);
st:=time():
inData:=readdata(fd, 1):
time() - st;
17.906
Converting to Array (Upper Case) is ~ 0.5 sec
st:=time():
B:=convert(inData, Array, datatype=float[8]);
time() - st;
You also may turn off autosave (as the Maple file is large)
and may wish to delete the Arrays (mark with mouse and delete),
otherwise they are stored if the file is saved.
Using Maple13 classic on a medium sized PC with WIN XP.
Robert Israel - 29 Jun 2009 18:18 GMT
> >>>>> Hi,
> >>>>>
[quoted text clipped - 34 lines]
> I forgot, whether there is a really efficient way (IIRC it is
> something like 'WriteMatrix' or so ...):
Perhaps you're thinking of writebytes and readbytes.
fName:="D:\\temp\\tst.txt";
A:=Array(1 .. 511^2, 'i -> evalhf(1/i)', datatype=float[8]);
st:= time():
writebytes(fName, A);
time()-st;
fclose(fName);
This took 0.249 seconds on my computer in Maple 13 Classic under Windows
Vista, where your writedata example took 4.509 sec. The resulting file
is 2041 KB, compared to 4333 KB for the writedata version.
st:= time():
B:= Array(1..511^2,datatype=float[8]);
readbytes(fName,B);
time()-st;
Takes 0.234 seconds.
> Digits:=18; # to have full length for floats
>
[quoted text clipped - 27 lines]
> Using Maple13 classic on a medium sized PC with WIN XP.
>

Signature
Robert Israel israel@math.MyUniversitysInitials.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
Axel Vogt - 29 Jun 2009 18:41 GMT
>>>>>>> Hi,
>>>>>>>
[quoted text clipped - 50 lines]
>
> Takes 0.234 seconds.
Thanks - that's convincing :-)
>> Digits:=18; # to have full length for floats
>>
[quoted text clipped - 26 lines]
>>
>> Using Maple13 classic on a medium sized PC with WIN XP.