Changeset 255 for trunk/thune/array.c

Show
Ignore:
Timestamp:
08/23/06 20:57:06 (2 years ago)
Author:
krobillard
Message:

Thune - Tweaked array minimum size.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/array.c

    r167 r255  
    7878        if( count < elemCount ) 
    7979        { 
    80             count = (elemCount < 8) ? 8 : elemCount; 
     80            /* Using a minimum size of 4 rather than 8 results in ~10% less 
     81               wasted memory.  Using 2 results in ~13% less. 
     82               Waste seems to run 100%-150% of used memory. 
     83             */ 
     84            if( elemSize >= 16 ) 
     85                count = (elemCount < 4) ? 4 : elemCount; 
     86            else 
     87                count = (elemCount < 8) ? 8 : elemCount; 
    8188        } 
    8289