Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Does Caml have slow arithmetics ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brandon J. Van Every <vanevery@i...>
Subject: RE: [Caml-list] tail recursion and register poor Intel architecture
Brian Hurt wrote:
> On Thu, 8 Jul 2004, Brandon J. Van Every wrote:
> > Or implement more of what Intel's crufty architecture
> actually offers.
> > For instance, supporting SSE would provide 8 additional 32-bit FPU
> > registers.
> If you're using the MMX/SSE[123] registers, you can not be
> using the x87 registers.

That is true/false.  These are *not* synonymous sets of registers.  MMX
registers are incompatible with the x87 FPU as you describe, because
they're aliases/repurposings of the x87 FPU registers.  The *XMM*
registers, associated with SSE/SSE2, are entirely separate registers.
You can most certainly use the x87 FPU simultaneously with those, no
special instruction state dances required.

> In addition, to move values between these registers (or the
> x87 registers) and the normal integer registers, you have to go via
> memory- i.e. write the value out to memory and read them back
> in again into the other register.  At which point you might as well be
> throwing them on the stack.

Well, you could pass the first 6 integer arguments via the normal
registers, the first 8 floating point arguments via the x87 FPU, and the
next 8 integer or float arguments via the XMM registers.  The values
wouldn't always be interoperable, you'd have to go through memory in
various cases, but it's better than nothing getting passed in registers
at all.  In any event I think this is more useful for FPU than integer

> SSE2 is also only available on the P4s and the
> Opterons/Athlon-64s

Yes I mentioned the P4 requirement.  So what?  P4s have been around for
quite some time now.  It of course would be a conditional compilation
flag, but I see no reason why one should fear a paucity of SSE2 support
nowadays.  My late model 866 MHz P-III is 4 year old technology now.  A
functional workhorse, but obsolescent.

> Those of us with older computers would like
> to keep backward compatibility.

Those of you with particularly old computers are cheap-ass bastards who
should afford buying a new one every 6 years or so.  :-)  I do believe
in buying "behind the power curve," but come on, by the time anybody
actually implements what I'm talking about the P-IIIs will be mostly

Brand*n Van Every               S*attle, WA

Praise Be to the caml-list Bayesian filter! It blesseth
my postings, it is evil crap!  evil crap!  evil crap!

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: