[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler recognizing uses of only two values

    Date: Thu, 3 Jul 86 11:57 EDT
    From: Kent M Pitman <KMP@SCRC-STONY-BROOK.ARPA>
    Subject: Compiler recognizing uses of only two values
    To: snyder%hplsny@hplabs.HP.COM

    I had thought about that and decided not to mention it because I fear
    someone will take it seriously. It's a good idea, of course, but unless
    you practically -- perhaps literally -- require compilers to do hairy
    optimizations like this, most people won't bother and I'll be stuck
    with having to effectively treat the feature as unavailable on some 
    systems. Sigh. The problem with portability is that the whole idea is to
    allow your program to move from the "reasonable" system you developed
    it in to a bunch of "hostile" systems that you didn't develop your code
    in -- often for good reason. Perhaps I'm being too pessimistic.

Of course, Common Lisp already has the problem that users and implementors
don't always agree on what "should" be efficient.  On the other hand, just
providing the "efficient" function in the language definition doesn't
guarantee that an implementor will implement it efficiently.  If he doesn't
share (or is not aware of) your view of its importance, he may implement it by
calling the inefficient function and throwing away the excess values.