English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] floating point performance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-05-30 (19:04)
From: Chris Hecker <checker@d...>
Subject: Re: [Caml-list] floating point performance

A topic that is dear to my heart.  I haven't done any nontrivial profiling on my application yet, though, so my advice is currently limited.

>Also, using Bigarray costs a factor of 3 in speed
>compared to otherwise identical code.  The profiler
>suggests that subscripting isn't getting inlined.
>Is there some way of getting faster performance out
>of Bigarray?

One thing I noticed is that if the types are at all generalized, the Bigarray.{} accesses aren't inlined.  So, my code looks like this:

type ba2d = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array2.t
type ba1d = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array1.t

let mult (a : ba2d) (x : ba1d) =  etc.

If the code's not too big, and you've got the identical C version, I'd like to see it.


To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr