chad kline wrote:
since i figured out the problem before my post appeared,
and don't want to waste people's time replying - i want
to add that the reason for the slowness in reading in
large files was due to the failure to use "realloc()".
the slowness was due to using malloc()/strcpy()/free().
Many applications that want improved I/O speed do not
use realloc. The applications allocate a static buffer
and haul a large chunk o' data into the buffer, then
parse away.
The goal is to keep the I/O medium in constant flow.
When the medium stops, there will be time required
for it to "ramp up" and seek to the previous location
of where it started. One method to this is to reduce
the quantity of I/O requests. One big access is
generally faster than a whole bunch of little ones.
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq:
http://www.parashift.com/c++-faq-lite
C Faq:
http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book