Re: integer*8 speed vs integer*4 speed
- From: "Steve Lionel" <steve.lionel@xxxxxxxxx>
- Date: 26 Feb 2007 18:21:56 -0800
On Feb 26, 8:16 pm, "Lynn McGuire" <nos...@xxxxxxxxxx> wrote:
Does anyone know of the relative speed difference of generally
using integer*8 over integer*4 ? Specifically in Win32.
It depends. The "standard" IA-32 instruction set doesn't have
instructions for 64-bit integers. A compiler which supports INTEGER*8
can do add and subtract in two instructions, but multiply and divide
may take many more and might be done in a routine call. A lot of other
operations that could be done in an instruction will also be done with
calls.
IA-32 has few registers available, so an I*8 probably gets moved in
and out of memory more than I*4. Use of SSE instructions can help with
this. There is of course the fact that you're using twice as much
memory, so if you're moving a lot of data you're doubling the load.
A lot will also depend on the particular compiler you use and the
instruction set you allow it.
If you have an application that is heavily into I*8 you'd be better
off switching to Win64.
Steve
.
- Follow-Ups:
- Re: integer*8 speed vs integer*4 speed
- From: David Frank
- Re: integer*8 speed vs integer*4 speed
- References:
- integer*8 speed vs integer*4 speed
- From: Lynn McGuire
- integer*8 speed vs integer*4 speed
- Prev by Date: Re: integer*8 speed vs integer*4 speed
- Next by Date: Re: converting a R code to fortran
- Previous by thread: Re: integer*8 speed vs integer*4 speed
- Next by thread: Re: integer*8 speed vs integer*4 speed
- Index(es):
Relevant Pages
|
|