Following on from my previous comment on Steve Knight's message.
> sfk@otter.hpl.hp.com (Steve Knight)
> Date: 22 Dec 92 14:55:12 GMT
> Organization: Hewlett-Packard Laboratories, Bristol, UK
Steve considered a change to use a special data-type for dynamic
lists, saying
> Now the common case is significantly quicker -- only inspecting the key
> of -x- to return a result.
>
> As far as I can tell, the same analysis follows through for all the
> list operators. The dynamic list operations are slightly worsened in
> performance, it is true, but looking at the statistics there it is
> a very small amount indeed.
>
> Is there some subtle detail about dynamic lists that I am overlooking?
> I would be grateful for any facts or insights into this aspect of
> POP. What motivates me is that I love having dynamic lists around
> but I hate having to pay -any- performance penalty for them if there is
> no necessity for it. So my question boils down to, where is the
> necessity?
I asked John Gibson about the possible advantage of using a new kind
of link and he commented:
| Checking whether the back is a procedure is merely 1 memory access
| slower than checking the key of the pair (ie, utterly insignificant).
| Once you know it's dynamic, checking the front for true/false is
| insignificant compared to the time taken the run the dynamic procedure,
| etc.
So maybe the efficiency issue is not worth worrying about, given
that you can already use front and back (or the fast_versions) for
speed when you know you are not using dynamic lists.
But I have not done any tests to check the difference it would make
to procedures like hd, tl, null, etc. on non-dynamic lists, if there
were a special datatype for dynamic lists.
aaron
--
Aaron Sloman, School of Computer Science,
The University of Birmingham, B15 2TT, England
EMAIL A.Sloman@cs.bham.ac.uk OR A.Sloman@bham.ac.uk
Phone: +44-(0)21-414-3711 Fax: +44-(0)21-414-4281
|