[DGD] DGDMP 1.1.10

Felix A. Croes felix at dworkin.nl
Wed Jun 10 00:52:21 CEST 2009


Shentino <shentino at gmail.com> wrote:

> Is there any way to collapse redundancy out of this?  Perhaps with
> indirection or with a tree instead of an array?  I bet there's a gazillion
> copies of AUTO and/or SECOND_AUTO floating around in that array.

There is only one reference to the auto object.  That particular
optimization was too good to leave out.

If you replace the simple array with a more complex structure, you need
a coordinate system for it, and each program lookup will either involve
walking a graph or using a hash table.  That's a lot of speed you're
giving up, probably a factor 3 or 4 in the interpreter's main loop.

The best I came up with uses an extra level of indirection, with a
moderate slowdown.  I may use it in DGDMP in the future; I'm not planning
any more significant innovations for DGD at this point.

Regards,
Felix Croes



More information about the DGD mailing list