Update a use of initTable to avoid initial enlarge.

This commit is contained in:
Charles Blake 2015-02-13 08:33:15 -05:00
commit 0a1bc0e9cd

View file

@ -302,7 +302,7 @@ template build_specification_lookup():
## Returns the table used to keep pointers to all of the specifications.
var result {.gensym.}: OrderedTable[string, ptr Tparameter_specification]
result = initOrderedTable[string, ptr Tparameter_specification](
nextPowerOfTwo(expected.len))
tables.rightSize(expected.len))
for i in 0..expected.len-1:
for param_to_detect in expected[i].names:
if result.hasKey(param_to_detect):