sq_newtableex

Squirrel 3.0

sq_newtableex

void sq_newtableex(HSQUIRRELVM v, SQInteger initialcapacity);

creates a new table and pushes it in the stack. This function allows to specify the initial capacity of the table to prevent unnecessary rehashing when the number of slots required is known at creation-time.

parameters:
HSQUIRRELVM v

the target VM

SQInteger initialcapacity

number of key/value pairs to preallocate