Version 6 of TArray

Updated 2013-04-18 22:18:04 by AK

tarray - Typed Array extension for Tcl

Note that this extension is very much in an experimental stage. It should be robust enough with a fairly comprehensive test suite. However, the API is incomplete and subject to change.

Project is hosted at SourceForge [L1 ].

Web site and documentation is at http://tarray.sourceforge.net .

The tarray extension implements a new Tcl collection data type - typed array - and associated commands column and table. A typed array stores elements of a specific data type in native format. The primary motivation for this extension is efficient memory utilization and speed of certain operations in applications dealing with very large numbers of elements. Typed columns and tables do not really provide any additional capabilities over Tcl's built-in commands, particularly list and dict and the script libraries based on these. Their primary use is in applications with large number of data items where memory consumption and cost of operations, such as searching and sorting, are greatly reduced.

The tarray extension was inspired in part by Speed Tables and to a lesser extent by TclRal.

The philosophy behind tarray is to provide efficient facilities on top of which more sophisticated data structures, possibly customized for specific applications, can be easily scripted and experimented with. Therefore, unlike Speed Tables, tarray does not require creation and recompilation of a new extension for each table definition. Moreover, tarray provides value-based semantics so that columns and tables can be used as basic building blocks. Additional facilities that Speed Tables provides, like remote access, are expected to be implemented at the script level.

SEH -- It would be useful to be able to do dumps of raw binary data once a TArray had been constucted. Then one could, for example, use it with a reflected channel to duplicate the function of memchan. Or to do device I/O. (Is this already possible?)


AK - 2013-04-18 22:18:04

Tcllib already has a memchan emulation based on reflected channels. Documentation @ https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/virtchannel_base/tcllib_memchan.html