On Tue, 2010-09-07 at 16:56 +0200, Luca Invernizzi wrote: > Hello Lionel (and CCd gtg contributors), > I'm trying to help in the development of liblarch_newbase, but I'd > like to hear from your experience: what do you think is not working > properly (also, in terms of performances)? Don't be afraid of being > lenghty, I'll read it all :)
Hey Luca — I don't think liblarch_rebased at the moment is using anything I wrote, but in my branch I made a performance-oriented change that might help: Almost everywhere in liblarch, Python lists are used (e.g. for keeping the children & parents of a node, the displayed nodes in a FilteredTree, etc.). Python sets (available since 2.4) function about the same as lists, but with two differences: one, they don't store the *order* of elements, and two, they are much faster, especially as the number of elements grows. In some few cases, *order* is actually important: e.g. for the children of a node. So those will have to remain lists. But the opposite example, parents of a node, the order of parents is never used. Nor is the order of displayed nodes in a FilteredTree, etc. Replacing most uses of lists in liblarch with sets would certainly bring a performance improvement, although I don't know how big it would be. Cheers, -- Paul Natsuo Kishimoto SM candidate (2012), Technology & Policy Program MIT Engineering Systems Division (ESD/TPP) http://paul.kishimoto.name +16173026105
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Mailing list: https://launchpad.net/~gtg-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~gtg-contributors More help : https://help.launchpad.net/ListHelp

