Cameron Laird's personal notes on crafting Tcl for performance

Jeffrey Hobbs has good advice on a variety of small subjects, including the Obj interface, appropriate use of associative arrays, and punctuation. Later, he elaborated these points, adding a few comments on Tk speed (across platforms), "caching array variables", and more. Paul Duffin details the performance hit of "listification" and connections to his current work on Feather.

Bob Techentin observes that "[i]t is faster to put initialization code into procs." Myself, I think it's often better style, too.

Dominique Pelle mentions a particular trick for canvas work. Alexandre Ferrieux urges canvas workers to look for opportunities to (re-)use image objects as opposed to pixel arrays.

Canvases under NT seem to be very slow sometimes. Removing tags occasionally helps.

There's MUCH more to say about performance with Tcl. I'm not sure when I'll make time to transcribe it. I do invite comments or specific questions; the latter often inspire a few paragraphs from me.

Cameron Laird's personal notes on crafting Tcl for performance/