Markus Neteler wrote: > (this was before on GRASS-user) > > On Sat, May 16, 2009 at 6:51 PM, Markus Neteler <[email protected]> wrote: > ... > >>> main.cpp:181: error: size of array ‘tic’ is too large >>> >> the problem is fixed: the recently increased cache did not fit >> on 32bit CPUs but only on 64bit. Now it is reduced to >> 4096 and it compiles again on 32bit, too. >> >> TODO: implement dynamically allocated arrays in the cache. >> > > Since this is unlikely to happen in the near future unless we > find a volunteer - is there a possibility to simply add a condition: > > if 32bit CPU, then use 4096, > if 64bit CPU, then use 2^16 *2 = 131072 (the largest value which > I found to not segfault i.atcorr) > > We speak about time reduction from several weeks to 40 minutes. > That seems to apply to class TICache and class TIMap. Both the TIMap and the TICache are (very often?) searched by simply going through the arrays. These searches, if they are really performed very often during execution of the module, would be much much faster using a balanced binary search tree instead of an array, added bonus would be to get rid of the limitation posed by MAX_TIs and MAX_TICs because TIMap and TICache would no longer be arrays but just pointers to the root of the respective search tree. IMHO, a further time reduction from 40 minutes to something like 4 minutes is not impossible. Any cpp guru out there willing to test this idea?
Markus M _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
