- Jun 27, 2002
- 2,908
- 0
- 76
I know, VB6 isn't the greatest thing there is, but I have to collaborate with others who use it for my new job as a research assistant.
I have a complex calculation to make, but thankfully it has a finite set of inputs: RGB data with 8 bits per channel. I wanted to make a look-up table that would store the answer as a Single precision (4 byte) number for each of the 16777216 inputs. The 64 megs of RAM this would take is well worth the effort.
As it is now, the program runs well once the table has been calculated, but I've been looking for a fast way to load the lookup table as a startup data file to speed up the process. Doing file access in 4-byte chunks is very slow, and doing it as a 64MB chunk is impossible.
Can anyone help me do this? I don't care how long it takes to store the file; it only has to be done once.
I'll show you some code so you can see what I'm talking about.
I have a complex calculation to make, but thankfully it has a finite set of inputs: RGB data with 8 bits per channel. I wanted to make a look-up table that would store the answer as a Single precision (4 byte) number for each of the 16777216 inputs. The 64 megs of RAM this would take is well worth the effort.
As it is now, the program runs well once the table has been calculated, but I've been looking for a fast way to load the lookup table as a startup data file to speed up the process. Doing file access in 4-byte chunks is very slow, and doing it as a 64MB chunk is impossible.
Can anyone help me do this? I don't care how long it takes to store the file; it only has to be done once.
I'll show you some code so you can see what I'm talking about.