Hi Alex,

> 'idx' is deliberately designed in this way. It does only the basic,
> straight-forward binary tree operations. This can be quite fast,
> because balancing operations (or using self-balancing trees like
> splay trees) introduce additional overhead. And - except for
> pathological situations where all data are inserted in sequentially
> ascending or descending order - this performs surprisingly well.


> 'balance' does not "re"-balance the tree. Instead, it builds an
> optimally balanced tree, only once in the beginning. This is most
> useful in situation like we had with this unicode index, which is
> not modified thereafter but only used for rapid lookup.

So 'idx' is usually used with data that don't change?  How does
indexing in the database work for example?

> BTW, there is also an external program "@bin/balance" which does the
> same by reading from a file. It can typically be used as:
>    (in (list "bin/balance" "-sort" MyFile)
>       (while (line)
>          ..
> (The "-sort" is not needed when the file is already sorted)

I saw the proram, but I haven't had a chance to find out what for,
when and how to use it yet;-)

> If you insert cells or lists with the key in the CAR, you can use
> 'lup' to lookup the data.

I see, that's what I was thinking about.

> the typical key-value situation, symbols work best, though. You can,
> for example, convert a numeric key to a symbol with 'format', and

Is this generally prefered to using lup?

Thank you,

UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to