Re: integer*8 speed vs integer*4 speed
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Mon, 26 Feb 2007 18:07:35 -0800
Lynn McGuire wrote:
Does anyone know of the relative speed difference of generally using integer*8 over integer*4 ? Specifically in Win32.
It depends somewhat on the compiler, but it should be able
to do add, subtract, and multiply inline, about twice the time
for two add or subtract instructions instead of one.
Around four or five times as long for multiply. integer*4
is one imull, integer*8 is two imull, one mull, two addl, and
about 9 movl.
integer*8 divide is done by subroutine call and might be significantly slower, about 12 times is my guess, but it could be more or less, and
might depend on how big the numbers are.
-- glen
.
- References:
- integer*8 speed vs integer*4 speed
- From: Lynn McGuire
- integer*8 speed vs integer*4 speed
- Prev by Date: integer*8 speed vs integer*4 speed
- Next by Date: Re: integer*8 speed vs integer*4 speed
- Previous by thread: integer*8 speed vs integer*4 speed
- Next by thread: Re: integer*8 speed vs integer*4 speed
- Index(es):