You need to uncomment the line 107 with Thread calls so that it is effectively linked to threads I think and see the difference !

I will try the profiling !

Rémi

On Tue, Feb 17, 2009 at 09:59, Mark Shinwell <mshinwell@janestcapital.com> wrote:
On Tue, Feb 17, 2009 at 08:40:11AM +0100, Rémi Dewitte wrote:
> I have made some further experiments.
> I have a functional version of the reading algorithm. I have the original
> imperative version of the algorithm.
> Either it is linked to thread (T) or not (X). Either it uses extlib (E) or
> not (X).

Using:

ocamlopt -o foo transf.ml
ocamlopt -thread -o foothread transf.ml unix.cmxa threads.cmxa

on local disk with a 24Mb, approx. 500,000-line CSV file, I only see a
minor slowdown with foothread as opposed to foo.  (A minor slowdown would
inded be expected.)  So I'm confused as to why your results are so
different.

You could use ocamlopt -p and run gprof on the resulting gmon.out file.

Mark