Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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  Archives: