Re: [Caml-list] Threads performance issue.

2009-02-17 Thread Jon Harrop
On Tuesday 17 February 2009 08:59:44 Mark Shinwell 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

Re: [Caml-list] Threads performance issue.

2009-02-17 Thread Rémi Dewitte
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 wrote: > On Tue, Feb 17, 2009 at 08:40:11AM +0100, Rémi Dewitte wrote: > > I have made s

Re: [Caml-list] Threads performance issue.

2009-02-17 Thread Mark Shinwell
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

Re: [Caml-list] Threads performance issue.

2009-02-16 Thread Rémi Dewitte
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). Results are. XX TX XE TE Imperativ

Re: [Caml-list] Threads performance issue.

2009-02-16 Thread Rémi Dewitte
Yaron, I use a slightly modified version of the CSV library's load_rows . Here is the main code which is highly imperative style. I might transform it in purely functional style ? The main program is : open Printf;; open Sys;; let timed_exec start_message f = print_string start_message; let

Re: [Caml-list] Threads performance issue.

2009-02-16 Thread Yaron Minsky
2009/2/16 Rémi Dewitte > Hello, > > I would like to read two files in two different threads. > > I have made a first version reading the first then the second and it takes > 2.8s (native). > > I decided to make a threaded version and before any use of thread I > realized that just linking no even

Re: [Caml-list] Threads performance issue.

2009-02-16 Thread Rémi Dewitte
...@yquem.inria.fr] *On Behalf Of *Rémi Dewitte > *Sent:* 16 February 2009 15:33 > *To:* Michał Maciejewski > *Cc:* caml-l...@inria.fr > *Subject:* Re: [Caml-list] Threads performance issue. > > > > > > On Mon, Feb 16, 2009 at 16:28, Michał Maciejewski > wrote: &g

RE: [Caml-list] Threads performance issue.

2009-02-16 Thread David Allsopp
Which OS (and port, if applicable) are you using? From: caml-list-boun...@yquem.inria.fr [mailto:caml-list-boun...@yquem.inria.fr] On Behalf Of Rémi Dewitte Sent: 16 February 2009 15:33 To: Michał Maciejewski Cc: caml-l...@inria.fr Subject: Re: [Caml-list] Threads performance issue. On

Re: [Caml-list] Threads performance issue.

2009-02-16 Thread Rémi Dewitte
On Mon, Feb 16, 2009 at 16:28, Michał Maciejewski wrote: > Hi, > > 2009/2/16 Rémi Dewitte : > > I guess it might come from GC slowing down thinks here, doesn't it ? > I don't think so. Why do you think it's GC? > Bad guess :) ! Any hint why just linking makes things slow ? > > > Can ocaml use mu

[Caml-list] Threads performance issue.

2009-02-16 Thread Michał Maciejewski
Hi, 2009/2/16 Rémi Dewitte : > I guess it might come from GC slowing down thinks here, doesn't it ? I don't think so. Why do you think it's GC? > Can ocaml use multiple cores ? No and as far as I know it's because of GC. ;-) regards Miichal ___ Caml-l

[Caml-list] Threads performance issue.

2009-02-16 Thread Rémi Dewitte
Hello, I would like to read two files in two different threads. I have made a first version reading the first then the second and it takes 2.8s (native). I decided to make a threaded version and before any use of thread I realized that just linking no even using it to the threads library makes m