At 10:41 AM 7/11/2002, Brian Pane wrote:
On Thu, 2002-07-11 at 06:58, Bill Stoddard wrote:
> I ran a quick profile with this patch and it eliminated a couple of
> divisions (calls to __divi64 reduced from 4 to 2 in my test setup. your
> mileage may vary) which was good for 493 instructions. Still have 3
__divu64
> and 2 __divi64 calls. The three __divu64 calls are in the
gettimeofday() CRT
> function, so there is not much we can do about these directly. One
__divi64
> is in apr_poll (convert microseconds to milliseconds. This can probably be
> optimized away). The other __divi64 is somewhere in cached_explode
> (util_time.c).
The only division that I know of in cached_explode() is:
struct exploded_time_cache_element *cache_element =
&(cache[seconds % TIME_CACHE_SIZE]);
Is that where the division operation is being generated
on your test system?
Actually, we still have division on construct busec from usecs.
That would be the one /1000000 which can never be optimized
away. Fortunately, it should be infrequent.
Bill