Version française
Home     About     Download     Resources     Contact us    
Browse thread
testers wanted for experimental SSE2 back-end
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] testers wanted for experimental SSE2 back-end
Hello Dmitry,

>> This is a call for testers concerning an experimental OCaml compiler
>> back-end that uses SSE2 instructions for floating-point arithmetic.[...]
> 
> I cannot provide any benchmark yet

Too bad :-( I got very little feedback to my call: just one data point
(thanks Gaetan).  Perhaps most OCaml users interested in numerical
computations have switched to x86-64bits already?  At any rate, given
such a lack of interest, this x86-32/SSE2 port isn't going to make it
into the OCaml distribution.

> but even not taking into account
> the better register organization there are at least two areas where
> SSE2 can outperform x87 significantly.
> 
> 1. Float to integer conversion
> Is quite inefficient on x87 because you have to explicitly set and
> restore rounding mode.

Right.  The mode change makes the conversion about 10x slower on x87
than on SSE2.  Apparently, float->int conversion is uncommon is
numerical code, otherwise we'd observe bigger speedups on real
applications...

> 2. Float compare
> Does not set flags on x87 so

The SSE2 code is prettier than the x87 code, but this doesn't seem to
translate into a significant performance gain, in my limited testing.

> As for SSE2 backend presented I have some thoughts regarding the code
> (fast math functions via x87 are questionable,

Most x86-32bits C libraries implement sin(), cos(), etc with the x87
instructions, so I'm curious to know what you find objectionable here.

> optimization of floating compare etc.) Where to discuss that - just
> here or there is some entry in Mantis?

Why not start on this list?  We'll move to private e-mail if the
discussion becomes too heated :-)

- Xavier Leroy