c - Loading files to RAM (static) for improving the read time -


i writing c program small application need read huge data file buffer , need mathematical operations on data in buffer. problem that, lets assume have file of size around 7mb, reading values buffer taking time thereby degrading performance of application. possible write file data ram better performance reducing read operation buffer?

going little different direction i'm going suggest profile application , see time spent. enough experience can sometimes guess correctly slow areas non-intuitive. guessing incorrectly means spend time optimizing things have little no affect on overall speed of program.

my guess loading time of 7 mb file not primary issue here on modern hardware file load times lower you'd expect. example, tested reading 14 mb file , load times around 6 ms. assuming loading file once wouldn't expect issue.

depending on version of vs2010 can use built-in profiling abilities. if not can create own simple profiling ability using windows queryperformancecounter() function. once find areas slowest can start @ how make them faster.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -