From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA08825; Mon, 28 Oct 2002 18:28:41 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA09115 for ; Mon, 28 Oct 2002 18:28:40 +0100 (MET) Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9SHSdD13152 for ; Mon, 28 Oct 2002 18:28:39 +0100 (MET) Received: from mel-rta7.wanadoo.fr (193.252.19.61) by mel-rto2.wanadoo.fr (6.5.007) id 3DA24CF600CA2F23; Mon, 28 Oct 2002 18:28:26 +0100 Received: from iliana (81.48.94.24) by mel-rta7.wanadoo.fr (6.5.007) id 3DA24BE600C3ACCA; Mon, 28 Oct 2002 18:28:26 +0100 Received: from luther by iliana with local (Exim 3.36 #1 (Debian)) id 186Dgf-0007EQ-00; Mon, 28 Oct 2002 18:28:25 +0100 Date: Mon, 28 Oct 2002 18:28:25 +0100 To: "M E Leypold @ labnet" Cc: "Yaron M. Minsky" , Caml List Subject: Re: [Caml-list] Strange slowness of input_line on mingw Message-ID: <20021028172825.GA27794@iliana> References: <32026.209.9.234.140.1035468351.squirrel@dragonfly.localdomain> <20021028162614.A2882@pauillac.inria.fr> <1035821576.16358.38.camel@dragonfly.localdomain> <15805.28797.298215.472767@hod.void.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15805.28797.298215.472767@hod.void.org> User-Agent: Mutt/1.4i From: Sven Luther Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Oct 28, 2002 at 06:14:37PM +0100, M E Leypold @ labnet wrote: > > > Yaron M. Minsky writes: > > > So, any other ideas, or suggestion as to how to narrow down the problem? > > Rather generic: Some kind of system call tracing (is that possible > with mingw?), to find out, wether the things happening between > userland and kernel are roughly equivalent in both cases. I mean: Same > number of reads, reading chunks around the same size and so on. If > not, then I'd look for a problem/difference in the C-Runtime against > which the OCaml intepreter (or the executable of your programm) are > linked. > > If things really happen in a different way deeper in userland, the GC > statistics might be different. Try printing that (I personally do not > believe it, but strange things happen now and then). > > Another Idea: Is your file large? If yes, the OCaml program might use > more memory (nothing is freed until th GC hit's the first time). And > another rather wild hypothesis is, that the kernel might be somehow > unwilling to grant that amount of memory and takes its time. But that > would mean that the OCaml program's process is blocked during a kernel > call for some time. Can you take pure user cpu time in windows? If > yes: try that. > > All this is rather generic. I'm no expert on how the OCaml system > works internally or interfaces with the host system. Taking this > profiles would be just an attempt to find more differences between > 'wc' and the OCaml implementation to have some data for more educated > guesses. BTW, what about re-implementing wc in ocaml using direct reading of the file without creating strings, and measure the time taken by this ? Friendly, Sven Luther ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners