Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-ses!hpcuhb!hpcllla!daryl From: daryl@hpcllla.HP.COM (Daryl Odnert) Newsgroups: comp.sys.hp Subject: Re: 9000/825 integer performance Message-ID: <3770015@hpcllla.HP.COM> Date: 14 Aug 89 18:06:55 GMT References: <5097@ucdavis.ucdavis.edu> Organization: Hewlett-Packard Calif. Language Lab Lines: 36 First, remember that as a RISC architecture, HP Precision Architecture does not have a generalized integer multiply instruction. However, * Multiplication by compile-time constants can generally be performed in four or fewer (single-cycle) instructions. * Multiplications by variables, including full overflow checking, can be obtained in an average of less than 20 single-cycle instructions. (This average is based on an expected distribution where 80% of the time, the absolute value of one of the operands of the multiply is <= 255.) * Multiplications involving large operands (where the smallest absolute value of the two operands is > 4K) can take between 36 and 56 cycles to complete. These datapoints were taken from "Integer Multiplication and Division on the HP Precision Architecture", Proceedings of the Second International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS II), ACM, October 1987. For floating-point, I think a double precision FMPY instruction on the 9000/825 takes somewhere in the neighborhood of 15 to 20 cycles to complete. An integer to floating point conversion probably takes about the same amount of time. Thus, if the typical operands to your integer multiplies are large values and not determined to be constants by the compiler, your results are reasonable. How are the operands to your multiplies computed? Also, did you use full optimization at compile time? Daryl Odnert Hewlett Packard California Languages Lab daryl%hpcllla@hplabs.hp.com