[Opensim-users] LSL could support nested lists

Serendipity Seraph seren.seraph at gmail.com
Thu Feb 28 21:17:29 UTC 2019


In my Lisp hacking a good rule of thumb is that if a property list or assoc
list (basically lists of pairs) has 20-50 (depending on implementation) or
less items then don't escalate to a hash table.

On Wed, Feb 27, 2019 at 2:05 AM Ethan Gardener <eekee57 at fastmail.fm> wrote:

> On Tue, Feb 26, 2019, at 10:16 PM, Haravikk wrote:
> > [...] I mean seriously, no proper array but instead we
> > get a linked-list that is fully copied on even minor modifications,
>
> I remembered this just as I was falling asleep after my last big email.
> Basically, LSL has two ways of preventing reference loops, each of which is
> quite good enough on its own.  Given that a list is copied on even the
> smallest of modifications, there's no reason to prevent lists containing
> list references. There's no way to make a circular reference because each
> list becomes immutable before its reference can be obtained.
>
> We could have nested lists as soon as appropriate functions could be
> designed and implemented.  (Now I think about it, I can't understand why
> no-one's implemented it before.)
>
>
> Don't get hung up on it being a linked list, the truth about performance
> is often very surprising and quite contrary to popular opinion.  For
> instance, a hash table may spend more time hashing than a linked list would
> searching.  This was an actual *serious* problem a few years ago with
> programmers producing terribly slow designs because they thought some
> techniques were always faster.  It's probably still going on, but I stopped
> paying attention because it makes me angry.  (Same with the async i/o /
> node.js hubris.)  In any case, because it's always copied, the actual
> implementation could be anything.
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
>


More information about the Opensim-users mailing list