caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Brent Fulgham <brent.fulgham@xpsystems.com>
To: Dave Berry <dave@kal.com>
Cc: caml-list@inria.fr
Subject: RE: questions about costs of nativeint vs int
Date: Fri, 12 Jan 2001 11:53:34 -0800	[thread overview]
Message-ID: <EDFD2A95EE7DD31187350090279C676701521B05@thresher.corp.xpsystems.com> (raw)

> Do you have any plans to implement unboxed native integers?
>

There's an interesting paper on the Caml site discussing the
performance issues of boxed/unboxed values.  From a performance
standpoint I believe it indicated boxed values were a better
tradeoff (between performance/flexibility), though the C
integration issues you mention below were not (IIRC) discussed.
 
> I would really have liked to see this happen, because it 
> would have made integration with C both easier and more efficient.
> 

Couldn't a wrapper generator of some kind make this less
problematic?

For instance, the MzScheme implementation provides various C
Macros and other tools to get at the boxed values:

int scheme_get_int_val(Scheme_Object* v);

And some predicates to decide what kind of object you are dealing
with:

int SCHEME_INTP(Scheme_Object* v);	// Returns true/false.

SWIG can be used to auto-generate interface code using these
routines to provide a C/Scheme bridge.

This should be possible in OCaml as well.

-Brent



             reply	other threads:[~2001-01-14 20:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-12 19:53 Brent Fulgham [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-01-17 13:47 Dave Berry
2001-01-12 12:39 Dave Berry
2001-01-14 11:13 ` Xavier Leroy
2001-01-15  2:09   ` John Prevost
2001-01-10 18:25 Norman Ramsey
2001-01-11 18:34 ` Xavier Leroy
2001-01-11 22:17   ` Norman Ramsey

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=EDFD2A95EE7DD31187350090279C676701521B05@thresher.corp.xpsystems.com \
    --to=brent.fulgham@xpsystems.com \
    --cc=caml-list@inria.fr \
    --cc=dave@kal.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;
as well as URLs for NNTP newsgroup(s).