On Wed, 24 Sep 2014, Beno?t Minisini wrote: > Le 23/09/2014 21:47, Tobias Boege a ?crit : > > Also, Benoit: tell me what you think about the interface. I documented > > everything in the source code (c_trie.c). > > > > The interface seems perfect. It's just the name "Trie" that I find ugly. :-) >
I pronounce it like "try". RadixTree or PrefixTree would be options for the container -- nothing against that -- but what about the other class? RadixTreePrefix or even PrefixTreePrefix? :-) Naming it Patricia (from the acronym) would be fun but even more confusing, right? > Another point on the implementation: you should not use malloc(), free() > and realloc(), but the functions provided by the interpreter API, i.e. > GB.Alloc(), GB.Free() and GB.Realloc(). > > They are usually faster, especially if you allocate small chunks of data. > > Moreover, they can detect memory leaks by checking that every allocation > has been freed at the end of the program. > > If you can compare with malloc() easily, don't hesitate not to trust me > and check. :-) > The trie.c and trie.h are from another library I wrote. (That's why I double-tested the projects with valgrind.) It should not be a problem to convert the uses of malloc()/free() now. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user