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
[Caml-list] Strange slowness of input_line on mingw
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: M E Leypold @ labnet <leypold@i...>
Subject: Re: [Caml-list] Strange slowness of input_line on mingw

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
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

Regards -- Markus
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: