From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id C66CEBC57 for ; Mon, 29 Mar 2010 18:49:38 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am4BABh3sEvUGyoGkWdsb2JhbACbJRUBAQEBCQsKBxEDH8AigmcIghIE X-IronPort-AV: E=Sophos;i="4.51,329,1267398000"; d="scan'208";a="59887219" Received: from smtp6-g21.free.fr ([212.27.42.6]) by mail4-smtp-sop.national.inria.fr with ESMTP; 29 Mar 2010 18:49:37 +0200 Received: from smtp6-g21.free.fr (localhost [127.0.0.1]) by smtp6-g21.free.fr (Postfix) with ESMTP id 51400E0821C; Mon, 29 Mar 2010 18:49:29 +0200 (CEST) Received: from [192.168.1.3] (che78-2-82-237-71-191.fbx.proxad.net [82.237.71.191]) by smtp6-g21.free.fr (Postfix) with ESMTP id 630F6E0822F; Mon, 29 Mar 2010 18:49:27 +0200 (CEST) Message-ID: <4BB0DA17.6090002@inria.fr> Date: Mon, 29 Mar 2010 18:49:27 +0200 From: Xavier Leroy User-Agent: Thunderbird 2.0.0.23 (X11/20100301) MIME-Version: 1.0 To: Dmitry Bely Cc: caml-list@inria.fr Subject: Re: [Caml-list] testers wanted for experimental SSE2 back-end References: <4B967857.3070303@inria.fr> <90823c941003230158n5080b46apc7c7462aead3372d@mail.gmail.com> In-Reply-To: <90823c941003230158n5080b46apc7c7462aead3372d@mail.gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 compiler:01 gaetan:01 ocaml:01 computations:01 rounding:01 speedups:01 flags:01 integer:01 experimental:01 experimental:01 dmitry:01 caml-list:01 functions:01 arithmetic:01 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