From: Ashok N. <apn...@ya...> - 2025-04-19 13:52:14
|
Hi Brian, Thanks for your comments. I remember you mentioning the tradeoff before as well. As it turns out, for the existing list commands, where the objects already exist, the indexing overhead of abstract lists is minor enough to not be an issue while memory savings are still present. So I'm experimenting with just the built-in list commands for now. We'll see how that goes and whether it is worthwhile. /Ashok ________________________________ From: Brian Griffin Hi Ashok., Nice analysis! Thanks! I've long been aware of the time/space tradeoff here. That's a decision one needs to make when implementing specific applications. I've always thought that abstract lists are best suited in cases where the dataset is effectively large, and already optimized for efficiency on some axis. And, the consumption is likely (but not necessarily) sparse. One example is an acyclic graph that represents a very large number of paths, with a much smaller number of nodes. The use case in practice may only explore some subset of the paths. The abstract list interface can provide access to the graph using existing Tcl script level commands, i.e., not having to create a new custom set of commands to access the custom graph data. I didn't answer your question directly. I think it depends on the specific application case. That's my 2¢ -Brian /Ashok _______________________________________________ Tcl-Core mailing list Tcl...@li...<mailto:Tcl...@li...> https://lists.sourceforge.net/lists/listinfo/tcl-core |