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

(LDB 0203 Y) versus (LDB X Y)



    Date: 18 SEP 1980 1543-EDT
    From: JONL at MIT-MC (Jon L White)

        Date: 18 September 1980 13:54-EDT
        From: Alan Bawden <ALAN at MIT-MC>
        Subject: *LDB, *DBP
        In fact when X is a constant (LDB X Y) expands into (BOOLE 1 (LSH Y ...) ...)
        So where is the gain?  In fact I would argue that the right solution
    You must have missed my comment about the case worth optimizing -- namely
    one like (LDB 0203 Y) as opposed to (LDB X Y).  If you did examine the
    former case, then I suggest you also expand the latter and compare the
    differences.

(ldb 0203 y) expands into (boole 1 (lsh y -2) 7)
(ldb x y)    expands into (*ldb (lsh x 30) y)

I don't see anything that looks like (*ldb ppss_30 ...) so I don't see
how anything has been saved.

If you are going to turn constants into lsh and boole so that the compiler can
code them, then you will NEVER be handing a pre-shifted constant into *ldb,
you will ALWAYS be doing a lsh before calling *ldb.

Come to think of it, if we are going to do things this way why doesn't dpb
with a constant ppss also expand into some booles and lshes?