Re: integer*8 speed vs integer*4 speed



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

.



Relevant Pages

  • Re: new crop of quantitative measurements?
    ... orthogonal architectures from which to ... I'm obviously not the only one to have noticed this combination, since even x86 cpus contain a parallel approximate reciprocal square root lookup instruction in the SSE instruction set, giving about 12 bits. ... In a cpu company, software people are second-rate citizens, which tends to cause the hw guys to look down on them, which tends to cause the really good compiler people to seem alternate employment. ... is the modest fraction of the time that register pressure makes ...
    (comp.arch)
  • Re: IAR MSP430 compiler problem
    ... Does anybody knows how to force compiler to use call instruction ... to next instruction after Spin function..... ... Interrupts are inherently asynchronous - if the thread can be suspended by an interrupt function, ...
    (comp.arch.embedded)
  • Re: RosAsm - right click
    ... writing an instruction that uses a variable ... variable...the immediate compiler should, of course, accept the ... want to see mostly mnemonics so put it back over to the left... ...
    (alt.lang.asm)
  • Re: IAR MSP430 compiler problem
    ... Does anybody knows how to force compiler to use call instruction ... In the OP's code, the Spin function seems to be the expected place for suspending and resuming the task, so the task is prepared for it, at that point. ... The code generated for Spin is exactly the kind of tight eternal loop that you often find in a kernel where the kernel has no ready tasks and waits for an interrupt. ...
    (comp.arch.embedded)
  • Re: Bad performance on alpha? (make buildworld)
    ... It's been a few years since I'd written a compiler, ... it is 4-way superscalar but the different execution ... instruction decode stages rather than just the integer pipeline), ... > architecture and relying on the L1 cache to handle the register spills ...
    (freebsd-performance)