Updated 2013-08-19 05:57:23 by APN

Summary  edit

Tcl_NewListObj, a function in the Tcl C API, creates a new value that has the internal representation of a list.

Description  edit

A performance trick to pre-allocate an internal list representation of some size, i.e., 10000. Useful to avoid the cost of reallocation when elements will be added individually:
Tcl_NewListObj(10000, NULL)

Note that this behaviour is not documented and hence subject to be changed.