caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr, Matteo Frigo <athena@fftw.org>
Subject: Re: [Caml-list] Ocamlopt x86-32 and SSE2
Date: Mon, 11 May 2009 03:45:20 +0100	[thread overview]
Message-ID: <200905110345.20272.jon@ffconsultancy.com> (raw)
In-Reply-To: <87pregtuvi.fsf@fftw.org>

On Monday 11 May 2009 00:12:49 Matteo Frigo wrote:
> Do you guys have any sort of empirical evidence that scalar SSE2 math is
> faster than plain old x87?

I believe the motivation is to make good performance tractible in ocamlopt so 
it is more about the ease of code generation rather than the inherent 
performance characteristics of the two approaches.

> I ask because every time I tried compiling FFTW with gcc -m32
> -mfpmath=sse, the result has been invariably slower than the vanilla x87
> compilation.  (I am talking about scalar arithmetic here.  FFTW also
> supports SSE2 2-way vector arithmetic, which is of course faster.)
>
> I also remember trying similar experiments with other numerical code in
> the Pentium 4 dark ages, with similar results.  I don't see any reason
> why this should be the case, and maybe this is just a problem of gcc,
> but I don't think you should automatically assume that SSE2 math is
> faster without running a few experiments first.

As I understand it, this is very much a problem with ocamlopt and not with 
gcc. Specifically, floating point code compiled by ocamlopt on x86 gives 
mediocre performance for unknown reasons. Hence there is a desire to use more 
modern solutions that simplify the generation of performant code.

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e


  reply	other threads:[~2009-05-11  1:38 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28 19:36 Ocamlopt code generator question Dmitry Bely
     [not found] ` <m27i13tofi.fsf@Pythagorion.local.i-did-not-set--mail-host-address--so-tickle-me>
2009-04-29 16:50   ` Dmitry Bely
2009-04-29 20:04     ` Jeffrey Scofield
2009-05-05  9:24 ` [Caml-list] " Xavier Leroy
2009-05-05  9:41   ` Dmitry Bely
2009-05-05 14:15     ` Jean-Marc Eber
2009-05-05 14:58       ` Sylvain Le Gall
2009-05-05 15:21         ` [Caml-list] " David Allsopp
2009-05-05 15:59         ` Dmitry Bely
     [not found]           ` <4A006410.8000205@lexifi.com>
2009-05-05 16:26             ` Dmitry Bely
2009-05-05 15:14       ` [Caml-list] " Jon Harrop
2009-05-08 10:21     ` [Caml-list] Ocamlopt x86-32 and SSE2 Xavier Leroy
2009-05-10 11:04       ` David MENTRE
2009-05-11  2:43         ` Jon Harrop
2009-05-11  3:43         ` Stefan Monnier
2009-05-11  5:38           ` [Caml-list] " Jon Harrop
2009-05-10 23:12       ` [Caml-list] " Matteo Frigo
2009-05-11  2:45         ` Jon Harrop [this message]
2009-05-11  7:55       ` Dmitry Bely
     [not found] <20090509100004.353ADBC5C@yquem.inria.fr>
2009-05-09 11:38 ` CUOQ Pascal
2009-05-10  1:52   ` [Caml-list] " Goswin von Brederlow
2009-05-10  2:16     ` Seo Sanghyeon
2009-05-10  3:50       ` Jon Harrop
2009-05-11  8:05         ` Dmitry Bely
2009-05-11  9:26           ` Jon Harrop
2009-05-11  8:43             ` Dmitry Bely
2009-05-11 13:47               ` Jon Harrop
2009-05-11  9:12             ` Andrey Riabushenko
2009-05-10  8:56     ` CUOQ Pascal
2009-05-10 14:47       ` [Caml-list] " Richard Jones
2009-05-10 19:25     ` Florian Weimer
     [not found] <20090511043120.976EBBC67@yquem.inria.fr>
2009-05-11  7:10 ` Pascal Cuoq
2009-05-12  9:37   ` [Caml-list] " Xavier Leroy
2009-05-12 12:40     ` Richard Jones
2009-05-13 22:30     ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200905110345.20272.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=athena@fftw.org \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).