Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: Richard Jones <rich@annexia.org>
Cc: "Dário Abdulrehman" <drehman31@gmail.com>, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] using BigArray to mmap huge binary file
Date: Thu, 9 Nov 2006 22:12:11 +0300 (MSK)	[thread overview]
Message-ID: <Pine.LNX.4.64.0611092209140.2299@home.oyster.ru> (raw)
In-Reply-To: <20061109184748.GA7016@furbychan.cocan.org>

On Thu, 9 Nov 2006, Richard Jones wrote:

> On Thu, Nov 09, 2006 at 06:30:50PM +0000, D?rio Abdulrehman wrote:
>> I have a huge binary data file that I would like to memory map for intensive
>> reading (no writing) with the best possible performance.
>> I read some discussions about using BigArrays to achieve this in Ocaml.  I
>> would like to know how this solution compares with the C language mmap.
>> Please bear in mind I am a total newbie to Ocaml but I have good Common Lisp
>> experience.
>
> We use Bigarray to map geographical data.  It works.  As far as I'm
> aware ArrayX.map_file is really just a wrapper around mmap, and read
> accesses are just indirections on a pointer.

I beg to differ, to the best of my knowlege every reference to bigarray
is bounds checked, even with -unsafe. So, while map_file does indeed look
like a wrapper around mmap, read/write is a bit more than an indirected
memory fetch.

--
vale


      reply	other threads:[~2006-11-09 19:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 18:30 Dário Abdulrehman
2006-11-09 18:47 ` Richard Jones
2006-11-09 19:12   ` malc [this message]

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=Pine.LNX.4.64.0611092209140.2299@home.oyster.ru \
    --to=av1474@comtv.ru \
    --cc=caml-list@yquem.inria.fr \
    --cc=drehman31@gmail.com \
    --cc=rich@annexia.org \
    /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