Weak dictionaries and optimized variables

Raphael Collet raph at info.ucl.ac.be
Wed Feb 25 16:23:49 CET 2004


Christian wrote:

> This is not about performance: it is about keeping things simple. So
> keep it simple.
> 
> Keeping things simple and clean is not a waste of time it is mandatory
> to ensure a system to live for a long time. If everybody performs acts
> of random weirdness the system eventually will crumble.

We actually never disagreed, Christian ;-)

The exchange builtins all follow the implementation of Exchange on
cells.  Exchange is defined as

   proc {$ C Old New} Old = {Boot_Cell.exchangeFun C New} end

The builtin BIexchangeFun called inside is defined as a function with
two inputs (C, New) and one output, which is unified with Old.  A more
"direct" implementation of Exchange would have three inputs, and would
make an explicit subsequent call to unification for the second argument,
i.e., Old.

At first sight the former implementation looks simpler that the latter.
I might be wrong, but I need a hint then.


Cheers,

raph



More information about the mozart-hackers mailing list