Wednesday, May 03, 2006

Is SSE2 mainstream?

The SSE2 extensions to the x86 architecture debuted when the Pentium 4 was released. SSE is a vector processing extension which only dealt with single-precision floats. SSE2 supports double-precision floats. What this means is that as of the Pentium 4, the x86 finally has a sane FPU architecture (the x87 is horrible to program for; it is stack-based, but only has a depth of 7 cells so you get the disadvantages of registers together with the disadvantages of a stack).

What I'm wondering is how widespread Pentium 4 (and above) chips are, and if the x86 backend of the Factor compiler should require SSE2 for floating point operations.

If you have thoughts, share them in the comments. Most likely, nobody will respond, and I will go ahead with my evil plan to drop support for Pentium III chips and older :-)


Martin said...

I'd like you to not drop support for p3-class chips.
I'm still doing most stuff from a box with an old athlon chip, and it'd be a pity to dump it just yet :o)

Anonymous said...

I second that. Still using my trusty old Thinkpad notebook with a Pentium 3.

Frank Carver said...

I've been keeping an eye on Factor for quite a while now, and I like the way it is progressing. I would like to vote in favour of keeping P3-class support (at least), though.

Factor is one of a class of "lean" programming languages and thus is potentially well-suited for embedded or application-specific use. This is an area where hot, heavy, loud, power-hungry, expensive processors are not a good choice. Older, quieter, slower, cheaper CPUs are often a much better choice, especially ones with a passive-cooling option such as the VIA EPIA series.

From a personal point of view, I have five P3 machines still in continual productive use (as well as one P2 and even one remaining P1), compared to only one P4 and one opteron machine. It was only about six months ago that I retired my last 386 (an SX, with no FPU at all!) in favour of the above-mentioned P1. And these are just the ones I know about - I can't say with any certainty which processors are used in the dozen or so servers I rent space on.

Chris Double said...

I also vote for sticking with older machine support. I have an athlon at home where I do most of my Factor hacking and it doesn't support SSE2.

Do linode machines support SSE2? If not it would prevent running on those as well.

Marche Fun├Ębre said...

I only have machines that support SSE2 and later. If you have to invest time in implementing floating point you better do it for features that will prove useful in the future not for the ones that will sink in obsolence.

Slava Pestov said...

Thanks for the feedback guys. In that case then, would an acceptable compromise be two boot images, boot.image.x86 and boot.image.pentium4? The latter would contain the same code as the former with the addition of one more file of floating point intrinsics. On Pentium 3 chips and below, floating point operations would call into the runtime as they do now.

Chris Double said...

Sounds good to me!