Re: Frequency of integer division in source code?

glew@ichips.intel.com (Andy Glew)
Fri, 11 Feb 1994 05:56:52 GMT

          From comp.compilers

Related articles
Frequency of integer division in source code? Peter-Lawrence.Montgomery@cwi.nl (1994-02-07)
Re: Frequency of integer division in source code? hbaker@netcom.com (1994-02-08)
Re: Frequency of integer division in source code? meissner@osf.org (1994-02-09)
Re: Frequency of integer division in source code? tfj@apusapus.demon.co.uk (1994-02-10)
Re: Frequency of integer division in source code? glew@ichips.intel.com (1994-02-11)
Re: Frequency of integer division in source code? bazyar@netcom.com (1994-02-10)
Re: Frequency of integer division in source code? cliffc@dawn.cs.rice.edu (1994-02-14)
Re: Frequency of integer division in source code? chase@Think.COM (1994-02-15)
Re: Frequency of integer division in source code? pardo@cs.washington.edu (1994-02-17)
| List of all articles for this month |
Newsgroups: comp.compilers
From: glew@ichips.intel.com (Andy Glew)
Keywords: architecture, optimize
Organization: Intel Corp., Hillsboro, Oregon
References: 94-02-058 94-02-070
Date: Fri, 11 Feb 1994 05:56:52 GMT

        meissner@osf.org writes:
        >[re division used for constant modulus in hash table, which can be
        > implemented by multiplying]


        Trevor Jenkins writes:
        Better yet is not to be mis-lead by Maurer's paper and to ignore his
        advice by using a table whose size is a power of two. Then the integer
        divide becomes an AND operation which is faster that division or
        multiplication on almost all architectures.


        The ``theory'' of using powers of two is explained in various papers by
        Hopgood et all from the late-60/early-70s.


Powers-of-2 are, of course, the underlying principle of most hardware
cache and TLB lookups.


But they have this annoying property: seems many people like
allocating objects on, say, 64K or 1M boundaries...
--
Andy "Krazy" Glew, glew@ichips.intel.com, Intel,
M/S JF1-19, 5200 NE Elam Young Pkwy, Hillsboro, Oregon 97124-6497.
Place URGENT in email subject line for mail filter prioritization.
--


Post a followup to this message

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