A 'speed' question

new topic     » topic index » view thread      » older message » newer message

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.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu