[fpc-devel]faster parser

Marco van de Voort marcov at stack.nl
Thu Apr 29 21:12:08 CEST 2004


> I wrote a Red-Black tree, which seems to be faster than TDictionary,
> even without spreading items into multible slots.
> 
> The Algorithm for rearanging the nodes is faster as for an AVL tree.
> The disadvantage to a normal search tree is that every node
> requires an additional Color field, also inserting and deleting is slightly
> slower because nodes are then rearranged to ensure a N log N search
> behaviour.
> 
> Would the additional space for the Color field in the TNamedIndexItem be 
> a problem,
> if the Red-Black Algorithm would be used in Tdictionary ?

Memory hungry people implement red/black in the alignment bits of the
pointers:-)




More information about the fpc-devel mailing list