Newsgroups: | comp.compilers |
From: | hbaker@netcom.com (Henry Baker) |
Keywords: | optimize, parallel, comment |
Organization: | nil organization |
References: | 95-10-092 95-11-015 95-11-047 |
Date: | Fri, 10 Nov 1995 14:50:02 GMT |
cliffc@ami.sps.mot.com (Cliff Click) wrote:
> wclodius@lanl.gov (William B. Clodius) writes:
>
> > 4. As noted recently in comp.lang.functional, most modern languages
> > emphasize lists (and other general forms) over special cases such as arrays
> > and vectors, although those special cases are precisely the forms that are
> > most easilly optimized, and are commonly associated with difficult
> > problems.
>
> In passing - I long ago gave up on linked lists except for cases that
> require dynamic insertion in the middle or huge/infrequent structures,
> and use arrays instead. When spinning down the list the locality of
> arrays beats pointer-chasing-cache-misses any day.
You are going to flunk your data structures course! :-)
Since you are writing compilers, and compilers are notorious for having
lots of little tables, each of which puts an arbitrary constraint on the
language being compiled, aren't you making life difficult for your customers?
There has been a lot of work on automatically choosing data structures. I
seem to recall that Jim Low's thesis in the 1970's was on this subject.
However, instead of building this intelligence into the compiler, it might be
nice to build this into a 'smart' template capability for C++ (or C+++).
--
www/ftp directory:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html
[There's no law that says you can't reallocate arrays when they fill up. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.