I need the speed

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

I need the fastest method to attain the same result.

bitbuffer = is a buffer that holds bits to be written to file.
i = value from 0 to 7
i2 = value from 0 to 255

bitbuffer = bitbuffer & int_to_bits(i, 3) & int_to_bits(i2, i + 1)

That line is called very often.
It is also the first call to bitbuffer so I have to prime it with
bitbuffer = {}
As of now the length of bitbuffer ranges from 0 to 18.
The length of bitbuffer changes constantly.
I have devised a method of solid length bitbuffer
with a bitbuffer pointer called bp.
I don't have the bitbuffer accumulating over 18 values as of know but
I wonder if that would make a difference in speed?

I use a while loop like the one below to write the bitbuffer out.

while length(bitbuffer) > 7 do
  puts(file2, bits_to_int(bitbuffer[1..8])
  bitbuffer = bitbuffer[9..length(bitbuffer)]
end while

Does anyone have a much better solution.

My changes so far have changed the speed
of a specified files proccessing from 1100 seconds to 957 seconds
OR 18 min. 20 sec. to 15 min. 57 sec.    18:20 to 15:57
A little over a 2 minute speed increase but still way to slow.
I don't want to wait 15 to 20 minutes for a 1.3 meg file being
proccessed.

PLEASE Help. :)

--Lucius Lamar Hilley III
--  E-mail at luciuslhilleyiii at juno.com
--  I support transferring of files less than 64K.
--  I can Decode both UU and Base64 format.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu