Re: Math Library Question


Subject: Re: Math Library Question
From: Jim Cole (greyleaf@yggdrasill.net)
Date: Fri Feb 25 2000 - 03:54:18 MST


If you know in advance what power things are going to be raised to, and
those values are small, it is generally much faster to write macros or
inlines that just do the direct multiplications. Playing games with
bitshifts can also improve performance in special cases.

Jim

Vanja Bucic's bits of Thu, 24 Feb 2000 translated to:

>
>I have been doing some extensive computational tasks on my G3 233 and
>found out something that disturbed me. By commenting out one line
>containing POW((double)a, (int)b), execution time of my program went
>from 12 secs to 1 sec !!!
>I used the standard math library trying to make a clean code. But the
>performance is unacceptable.
>Are there any ways (libraries, tricks, bla, bla) to avoid such stalls on
>basic math functions like EXP and POW?
>I am taking anything into consideration.
>
>PS: Using C++ ,
>egcs-2.91.66 (1.1.2 release)
>
>Thanks
>Vanja Bucic
>Bartol Research Institute
>



This archive was generated by hypermail 2a24 : Wed Mar 01 2000 - 00:07:11 MST