|[10 earlier articles]|
|Re: Effectiveness of compilers today email@example.com (1993-02-19)|
|Re: Effectiveness of compilers today firstname.lastname@example.org (1993-02-19)|
|Re: Effectiveness of compilers today email@example.com (1993-02-20)|
|Re: Effectiveness of compilers today firstname.lastname@example.org (1993-02-19)|
|Re: Effectiveness of compilers today email@example.com (1993-02-22)|
|Re: Effectiveness of compilers today firstname.lastname@example.org (1993-02-24)|
|Re: Effectiveness of compilers today email@example.com (1993-03-02)|
|Re: Effectiveness of compilers today firstname.lastname@example.org (1993-03-03)|
|From:||email@example.com (Donald Lindsay)|
|Organization:||School of Computer Science, Carnegie Mellon|
|Date:||Tue, 2 Mar 1993 19:25:47 GMT|
firstname.lastname@example.org (Preston Briggs) writes:
>It's similar to the idea of writing an exponential routine to search for
>better ways to convert integer-multiply-by-a-constant to shifts, adds, and
>subtracts. There are known routines that do a good job, but an optimal
>translation requires exponential search. Therefore, build a searcher that
>tries to beat your normal routine and let it run for a while (days, weeks,
I maintained just such a beast (written by Guy Steele).
It didn't search for ways to multiply by N. instead, it generated all
interesting combinations of the relevant instructions (up to some code
size that would be as slow as the general method). For each, it found out
*what* N that was equivalent to multiplying by. If the code combination
was better than the previous-best (for N), then, write it down. At the
end, sort and encode.
This code ran for days, but on a VAX 11/780. A 70-SPECint machine should
be able to do things like this in an afternoon.
Don D.C.Lindsay Carnegie Mellon Computer Science
Return to the
Search the comp.compilers archives again.