Tcl_NewListObj

Summary

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

Description

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.