Raymond Toy wrote on Fri, Oct 18, 2002 at 02:54:53PM -0400: 
> >>>>> "Martin" == Martin Cracauer <[EMAIL PROTECTED]> writes:
> 
>     Martin> Looking over the spec I also find that there is no way to detect
>     Martin> overflow.  Not that big a deal, but still breaking some of the Lisp
>     Martin> spirit.
> 
> MMX can do basic arithmetic operations on 64-bit integers?

Yes, but I am not sure it is that cheap.  Intel meant this to be a
SIMD mechanism (one instruction, executed on several data items at
once), but since we only use one it for one thing at a time we only
use part of the speedup.

The real performance issue here (in a tradeoff between doing 64 bit
integer artithemtic either on two 32 bit registers on in MMX) is that
we cannot know what the real cost is.

One mechanism requires register switching, the other requires to flush
the FPU state.

However, I know that some modern x86 implementations really do have a
lot more registers internally and shifting registers to memory and
back later can be extremly cheap.  However, there is no way to tell
whether your processor has it without trying.

And similar, Intel carefully worded the MMX spec to allow for an
implementation where the state of MMX is not actually shared with the
FPU.  While you are required to swap the state in your code, they are
free to build a CPU which has seperate spaces and make the swapping a
very cheap operation.  I don't know whether they actually have a CPU
like that.

Martin

Reply via email to