From: "Jack Andrews" <effbiae@ivorykite.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] custom mmap modeled on bigarray
Date: Tue, 10 Aug 2004 15:06:01 +1000 (EST) [thread overview]
Message-ID: <49993.60.246.255.166.1092114361.squirrel@www.ivorykite.com> (raw)
In-Reply-To: <37738.60.246.255.171.1091633896.squirrel@www.ivorykite.com>
i know the argument for developing first, optimizing later. i also know
the arguments for not caring about fine-grain performance and to look
at the big picture. i've argued both and seen where these arguments fail.
consider compressed data as a bit stream from disk.
say it has simple encoding:
phrase :=
byte:<number-of-bits>, byte:<number-of-values>, int[]:<bit-stream>
eg:
0x03 0x0a 0b1110 0011 1001 0100 1110 0101 1101 1100
| | +<bit-stream>
| +number-of-values
+number-of-bits
represents the sequence of 10 3-bit numbers:
111,000,111,001,010,011,100,101,110,111
now consider a sentence as
sentence := <empty> | phrase, sentence
without an enhanced FFI, ocaml will be considerably slower than C for
uncompressing (and compressing).
in my previous post, i suggest that some language primitives similar to
%bigarray_ref_1 could be introduced to make ocaml comparable to C. i
have investigated this possibility, and my suggestion is that
%bigarray_ref is replaced by a primitive %ffi_ref and made public.
then bigarray can be built on the more general %ffi_ref and developers
have a fast means of accessing C arrays like mmap regions.
if i spend time implementing %ffi_ref/set, is there any chance of it being
incorporated into ocaml?
thanks,
jack
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2004-08-10 5:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-04 2:39 [Caml-list] c is 4 times faster than ocaml? effbiae
2004-08-04 4:59 ` John Prevost
2004-08-04 5:05 ` John Prevost
2004-08-04 5:24 ` effbiae
2004-08-04 7:28 ` John Prevost
2004-08-04 8:18 ` [Caml-list] " Jack Andrews
2004-08-04 10:06 ` Mikhail Fedotov
2004-08-04 10:25 ` [Caml-list] " Jack Andrews
2004-08-04 15:38 ` [Caml-list] custom mmap modeled on bigarray Jack Andrews
2004-08-10 5:06 ` Jack Andrews [this message]
2004-08-11 14:52 ` Eric Stokes
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=49993.60.246.255.166.1092114361.squirrel@www.ivorykite.com \
--to=effbiae@ivorykite.com \
--cc=caml-list@inria.fr \
/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;
as well as URLs for NNTP newsgroup(s).