Hi,

    >> very slow. After we made the insert operation in the AVL tree
    >> hyperstrict and a few similar changes, our program behaved very
    >> well and is surely faster than if written in C using naive data
    >> structures and algorithms.  We used combinators like strict2 f x
    >> y = strict (strict f x) y to achieve a simple code.

    Jan> I find this interesting. It would be nice if you would like to
    Jan> explain me what you mean by " hyperstrict"

I agree with the definition of hyperstrictness, that a function is
hyperstrict if it evaluates its arguments completely.

What I meant concerning the AVL tree was not complete hyperstrictness
but, that all parts which influence the structure of the tree
are evaluated when a new element is inserted. The crucial point
is that the application of the tree constructors must be strict to
guarantee that the restructuring balancing operation is performed
immediately. The comparison operators and the condition in
if-then-else are strict anyway and, thus, will force sufficient
evaluation. However, data stored in the tree that is not used for
the operations on the tree need not be evaluated.

Cheers
Christoph
 

  

Reply via email to