Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: jean-marc alliot <alliot@recherche.enac.fr>
To: David Gurr <gurr@mrs.med.ge.com>
Cc: caml-list@inria.fr, Xavier.Leroy@inria.fr
Subject: Re: single-precision floats, etc.
Date: Fri, 20 Oct 2000 15:02:19 +0200	[thread overview]
Message-ID: <39F0425B.C91759FE@recherche.enac.fr> (raw)
In-Reply-To: <200010192350.QAA14515@mrs.mrs.med.ge.com>

David Gurr wrote:

> > I'm curious to why you need single floats.  It's certainly not for
> > speed, because most processors nowadays do not compute over single
> > floats any faster than over double floats.
>
> Machines with multimedia instruction sets do compute over single floats
> faster than double floats when the single floats are packed into a 64 bit
> pair of singles or a 128 bit quad of singles.
>

Yes, but there are drawbacks:
1) you have to write anyway something in assembly language to easily get
down to this level. I concede that one (small) problem of ocaml is the fact
that external functions written in assembly or C can not be inlined. This is
mainly what I would ask Xavier to think about, but it is clearly a major
problem.
2) Performances get as high as 4 Gflops on a 1Ghz P-III, but it is only true
when you can have vectorizable code. It is usually not that easy to
vectorize an application, and one multiplication between 2 packed 4-float
vectors on a P-III is not faster than a multiplication between 2 doubles
(well, with the pipelining techniques on the P-III, many things depend on
what is before and after the instruction, but I am probably right on the
whole)
3) float are very often not enough in precision for many applications.


A demonstration of vectorization and precision problems are here :
http://www.recherche.enac.fr/~alliot/mand.html




  reply	other threads:[~2000-10-21  7:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-19 23:50 David Gurr
2000-10-20 13:02 ` jean-marc alliot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-10-27 21:39 ortmann
2000-10-29  6:18 ` Chris Hecker
2000-10-18  1:17 David Gurr
2000-10-18  9:56 ` Chris Hecker
2000-10-17 16:10 Damien Doligez
2000-10-18  8:39 ` Remi VANICAT
2000-10-18  8:41 ` Fermin Reig
2000-10-18  9:51 ` Chris Hecker
     [not found] <Chris Hecker's message of "Mon, 16 Oct 2000 11:20:59 -0700">
2000-10-16 18:20 ` Chris Hecker
2000-10-18 13:53   ` Pierre.Boulet
2000-10-18 15:20     ` Chris Hecker
2000-10-19 11:28       ` Stephan Houben
2000-10-19 11:37       ` Xavier Leroy
2000-10-20  2:18         ` Chris Hecker
2000-10-19  9:11   ` Xavier Leroy
2000-10-23 13:28     ` Charles Martin
2000-10-25  3:22       ` Chris Hecker

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=39F0425B.C91759FE@recherche.enac.fr \
    --to=alliot@recherche.enac.fr \
    --cc=Xavier.Leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=gurr@mrs.med.ge.com \
    /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