A 'speed' question
Is there a way to speed up this loop, which reads a binary file into a
sequence from an attached resource file in a bound program, and then
writes it out to disk ?
jk=rOpen("eu.bmp","rb")
while not rEOF(jk) do
b=b & getc(jk)
end while
close(jk)
...etc.
In the program I've written, reading this data from the resource, and
saving it to disk takes about 4.4 seconds. So here's what I did:
I used Jiri Babor's pack.ex to compress the data ( to 65% ), and
included his unpack() procedure in my program. Interestingly enough,
even WITH the overhead of decompression, the routine only took 3.4
seconds, an improvement of 23% !!!
Either this loop, or getc() itself, is a real 'tortoise', so
...is there an easy way to speed this up ?
Wolf.
|
Not Categorized, Please Help
|
|