From: Richard Jones <rich@annexia.org>
To: "Dário Abdulrehman" <drehman31@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] using BigArray to mmap huge binary file
Date: Thu, 9 Nov 2006 18:47:48 +0000 [thread overview]
Message-ID: <20061109184748.GA7016@furbychan.cocan.org> (raw)
In-Reply-To: <6aeedf580611091030n30ddd9ddjdce831076761bc3@mail.gmail.com>
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.
Depends a lot on what format your data is in. Ours is stored as a
huge array of 16-bit signed ints and Bigarray supports that naturally.
If your data was in an unsupported format, or if it wasn't strictly an
array, you might end up doing contortions.
Rich.
--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Internet Marketing and AdWords courses - http://merjis.com/courses - NEW!
Merjis blog - http://blog.merjis.com - NEW!
next prev parent reply other threads:[~2006-11-09 18:48 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 [this message]
2006-11-09 19:12 ` malc
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=20061109184748.GA7016@furbychan.cocan.org \
--to=rich@annexia.org \
--cc=caml-list@yquem.inria.fr \
--cc=drehman31@gmail.com \
/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