Re: Multiply by a constant --> shift-and-adds algorithm?

Sergey Solyanik <ssolyanik@icdc.com>
14 Nov 1997 11:45:36 -0500

          From comp.compilers

Related articles
[2 earlier articles]
Re: Multiply by a constant --> shift-and-adds algorithm? preston@cs.rice.edu (1997-11-09)
Re: Multiply by a constant --> shift-and-adds algorithm? ssolyanik@icdc.com (Sergey Solyanik) (1997-11-09)
Multiply by a constant --> shift-and-adds algorithm? txr@alumni.caltech.edu (Tim Rentsch) (1997-11-09)
Re: Multiply by a constant --> shift-and-adds algorithm? n8tm@aol.com (1997-11-11)
Re: Multiply by a constant --> shift-and-adds algorithm? dube@brachio.IRO.UMontreal.CA (Danny Dube) (1997-11-11)
Re: Multiply by a constant --> shift-and-adds algorithm? cdg@nullstone.com (Christopher Glaeser) (1997-11-13)
Re: Multiply by a constant --> shift-and-adds algorithm? ssolyanik@icdc.com (Sergey Solyanik) (1997-11-14)
Re: Multiply by a constant --> shift-and-adds algorithm? shankar@powertelglobal.com (Shankar Unni) (1997-11-15)
Multiply by a constant --> shift-and-adds algorithm? preston@tera.tera.com (1997-11-16)
Re: Multiply by a constant --> shift-and-adds algorithm? cdg@nullstone.com (Christopher Glaeser) (1997-11-18)
const_int * (int / const_int) by shift adds? cef@geodesic.com (Charles Fiterman) (1997-11-20)
| List of all articles for this month |

From: Sergey Solyanik <ssolyanik@icdc.com>
Newsgroups: comp.compilers
Date: 14 Nov 1997 11:45:36 -0500
Organization: Bentley Systems, Inc.
References: 97-11-038 97-11-078
Keywords: optimize, practice

Christopher Glaeser wrote:
> When testing various
> compilers with different repeating bit patterns, I have measured compile
> times of several minutes per constant, and on rare occasion, have
> measured compile times as high as one hour per constant.


Do you have examples? My version (and it is optimal) runs in
couple of seconds for _ALL_ 32K numbers (executed in a loop from
1 to 32000, total time). One hour per constant seems uncomprehensible...


Regards --


Sergey Solyanik
Software Developer
Bentley Systems, Inc
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.