Browse thread
[Caml-list] c is 4 times faster than ocaml?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Eric Stokes <eric.stokes@c...> |
| Subject: | Re: [Caml-list] custom mmap modeled on bigarray |
Even if it isn't it can be distributed as a GODI patch fairly easily. I think a patch such as this, if architected well would allow me to improve performance of some of my C bindings even more, and that is a good thing. On Aug 9, 2004, at 10:06 PM, Jack Andrews wrote: > 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 > ------------------- 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