Browse thread
Comments welcomed to progr. style / speed of my first ocaml program "Error correcting LDPC decoder"
-
Andries Hekstra
-
Gerd Stolpmann
-
Gerd Stolpmann
- Xavier Leroy
-
Gerd Stolpmann
- Jon Harrop
-
Gerd Stolpmann
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-12-15 (15:09) |
From: | Xavier Leroy <Xavier.Leroy@i...> |
Subject: | Re: [Caml-list] Comments welcomed to progr. style / speed of my first ocaml program "Error correcting LDPC decoder" |
> I forgot one thing: This comment is only correct for 32 bit code. 64 bit > code has a uniform array layout for all element types. Yes, but a generic access to a float array still involves an extra boxing operation. So, your advice is sound for 64-bit plaforms as well. I had a very quick look at the original poster's code: it seems reasonable performance-wise. There are a few extra hacks that could be done to increase performance at some expense in code clarity, for instance turning a.(i).(j) <- f i j a.(i).(j); in (let b = a.(i) in b.(j) <- f i j b.(j)); but I wouldn't recommend doing this unless profiling exhibits a big "hot spot" in this function. - Xavier Leroy