From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 311E9BC0A for ; Tue, 2 Jan 2007 23:43:46 +0100 (CET) Received: from smtp.syd.people.net.au (smtp.syd.people.net.au [218.214.225.98]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id l02MhhLl032018 for ; Tue, 2 Jan 2007 23:43:45 +0100 Received: (qmail 7207 invoked from network); 2 Jan 2007 22:37:06 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 2 Jan 2007 22:37:06 -0000 Received: from coltrane (coltrane [192.168.1.101]) by coltrane.mega-nerd.net (Postfix) with SMTP id C33A17B6B for ; Wed, 3 Jan 2007 09:37:01 +1100 (EST) Date: Wed, 3 Jan 2007 09:37:01 +1100 From: Erik de Castro Lopo To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ANNOUNCE : libsndfile-ocaml alpha Message-Id: <20070103093701.3b827e81.mle+ocaml@mega-nerd.com> In-Reply-To: <1167765505.5341.12.camel@rosella.wigram> References: <20061222155407.ebe6c272.mle+ocaml@mega-nerd.com> <45923DC2.9000504@ujf-grenoble.fr> <20061227211046.656615d0.mle+ocaml@mega-nerd.com> <20061231080756.66e89d6c.mle+ocaml@mega-nerd.com> <1167535885.27287.66.camel@rosella.wigram> <20061231152305.694fd3e9.mle+ocaml@mega-nerd.com> <20061231110831.GA21198@furbychan.cocan.org> <20070101095114.911ca90d.mle+ocaml@mega-nerd.com> <4599205A.7050802@laposte.net> <20070102065845.c6558b18.mle+ocaml@mega-nerd.com> <1167699073.13679.15.camel@rosella.wigram> <20070102121424.07da295b.mle+ocaml@mega-nerd.com> <1167765505.5341.12.camel@rosella.wigram> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 2.3.0beta5 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 459AE01F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 paging:98 wrote:01 abstract:01 slower:01 writes:01 caml-list:01 btw:02 overly:02 erik:04 erik:04 thread:05 linux:06 linux:06 reads:06 skaller wrote: > Mmaping the file doesn't require pre-loading it, its loaded > on demand by the paging system. Still, some files might not be mappable, > depending on the OS and device they're on. As I have already stated twice in this thread, libsndfile does not mmap files. It just reads and/or writes :-). BTW, anyone mmaping files on Linux for performance reasons should be aware that Linus himself doesn't think mmap will have any performance improvement over read: http://www.cs.helsinki.fi/linux/linux-kernel/2001-40/1661.html Someone has benchmarked mmap vs read/write and found mmap lacking: http://lkml.org/lkml/2002/3/13/38 Interestingly, mmap is also slower than read on freebsd: http://lists.freebsd.org/pipermail/freebsd-questions/2004-June/050245.html http://lists.freebsd.org/pipermail/freebsd-questions/2004-June/050265.html Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one?" -- Tom Cargill