]> git.wincent.com - wikitext.git/commit
Instrument array functions to pick optimal buffer size
authorWincent Colaiuta <win@wincent.com>
Mon, 4 Feb 2008 22:35:40 +0000 (23:35 +0100)
committerWincent Colaiuta <win@wincent.com>
Mon, 4 Feb 2008 22:35:40 +0000 (23:35 +0100)
commit2199333ad476f31a6a6ce0ec7f9332253b2af0d8
tree30fb549f18e067691329a4fb9dc38c0ca5e968ee
parente942be5b26ca5d222c702e3257049a624feb2ad0
Instrument array functions to pick optimal buffer size

Add basic instrumentation to the array wrapper functions to see how big
they grow in typical use. Running the entire spec suite the lengthiest
array seen had 26 entries, so we'll use this information in setting a
default size in our custom array implementation.

64 entries (64 bytes) is probably more than enough for most uses.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
ext/ary.h