Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Sven Luther <luther@dpt-info.u-strasbg.fr>
To: "M E Leypold @ labnet" <leypold@informatik.uni-tuebingen.de>
Cc: "Yaron M. Minsky" <yminsky@CS.Cornell.EDU>,
	Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Strange slowness of input_line on mingw
Date: Mon, 28 Oct 2002 18:28:25 +0100	[thread overview]
Message-ID: <20021028172825.GA27794@iliana> (raw)
In-Reply-To: <15805.28797.298215.472767@hod.void.org>

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


  reply	other threads:[~2002-10-28 17:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-24 14:05 Yaron M. Minsky
2002-10-28 15:26 ` Xavier Leroy
2002-10-28 16:12   ` Yaron M. Minsky
2002-10-28 17:14     ` M E Leypold @ labnet
2002-10-28 17:28       ` Sven Luther [this message]
2002-10-28 17:42         ` Yaron M. Minsky
2002-10-29  0:10     ` Oleg
2002-10-29  1:06       ` Yaron M. Minsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021028172825.GA27794@iliana \
    --to=luther@dpt-info.u-strasbg.fr \
    --cc=caml-list@inria.fr \
    --cc=leypold@informatik.uni-tuebingen.de \
    --cc=yminsky@CS.Cornell.EDU \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox