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
Threads performance issue.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Mark Shinwell <mshinwell@j...>
Subject: Re: [Caml-list] Threads performance issue.
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).


ocamlopt -o foo
ocamlopt -thread -o foothread 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

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