Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Efficient C++ interfacing?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: ronniec95@l...
Subject: RE: [Caml-list] Efficient C++ interfacing?
Hi,

I've done a fair amount of C interfacing with Ocaml. Although the auto-conversion
tools are ok, it's usually simpler (and definitely faster in terms of performance)
to roll your own I've found. And it's actually not that complicated for
most things.

Also with handrolling your own interface you'll get something that is more
ocaml like and makes more sense (from a usability perspective) than auto
generated ones most of the time. This is from my experience only, and YMMV.

If you want specific examples, I can send you.

Ronnie
>-- Original Message --
>From: "Brandon J. Van Every" <vanevery@indiegamedesign.com>
>To: "caml" <caml-list@inria.fr>
>Subject: [Caml-list] Efficient C++ interfacing?
>Date: Sun, 30 May 2004 00:41:31 -0700
>
>
>On the subject of C++, the archive is daunting and not terribly
>informative.  If this has been asked before and good answers have been
>given, I'm happy for pointers.  Otherwise, I figure it doesn't hurt to
>ask the same questions at some repeating time interval.
>
>If one wants to interface native OCaml code to native C++ code for
>performance reasons, what is a good way to go about it?  Are there any
>automated binders for this native-native linkage?  I've been looking at
>SWIG but am unsure if it's native-native.  The OCaml SWIG author
>suggested that the performance is more on par with calling a scripting
>language, but maybe I misunderstood.  I'd be interested in optimizing
>that, but only if it's a reasonable architectural approach.  I really
>don't have a handle on what C++ <--> OCaml efforts are out there.
>Anything other than SWIG?
>
>My challenge problem is providing OCaml bindings for The Nebula Device
>2.  http://nebuladevice.cubik.org.  I do not wish to use their script
>server interface.  It looks like a relatively low performance binding -
>adequate for scripts that aren't supposed to be fast, but really not
>intended for native-native communication.  Also, script servers can only
>interface nRoot objects, leaving a whole class of nNode objects that
>must be accessed from C++.
>
>
>Cheers,                     www.indiegamedesign.com
>Brandon Van Every           Seattle, WA
>
>"The pioneer is the one with the arrows in his back."
>                          - anonymous entrepreneur
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.691 / Virus Database: 452 - Release Date: 5/26/2004
> 
>
>Attachment: winmail.dat
>


-------------------
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