On Mon, Jul 26, 2010 at 12:59 AM, Jérémie Dimino <jere...@dimino.org> wrote:
> Yes, i tried it some time ago with two small C programs which were just
> reading a file on the disk. One doing read operations in a simple loop,
> and one launching a thread for each read operation (or reusing the same
> thread). The threaded version was about 100 times slower than the
> non-threaded one.

This is perhaps off-topic for the list, but what is the reason for
this? I can imagine that launching a thread might be heavy, but is the
context-switch overhead for threads so bad?

> BTW it is planed to add some kind of asynchronous file I/O support in
> Lwt by using mmap and mincore.

How would this work? Is it possible to be notified when the page comes
into core (mincore appears to support only polling)? Is it possible to
request a page without blocking (by reading from it)? Just curious.

Jake

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to