caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Norman Ramsey <nr@eecs.harvard.edu>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: questions about costs of nativeint vs int
Date: Thu, 11 Jan 2001 17:17:59 -0500	[thread overview]
Message-ID: <200101112217.f0BMHvv31368@wally.eecs.harvard.edu> (raw)
In-Reply-To: Message from Xavier Leroy <Xavier.Leroy@inria.fr>  of "Thu, 11 Jan 2001 19:34:07 +0100." <20010111193407.A4332@pauillac.inria.fr>

 > Values of type "nativeint", "int32" and "int64" are boxed
 > (heap-allocated and handled through a pointer), while values of type
 > "int" are unboxed...
 >
 > >   type loc = Cell of char * int * width
 > >            | Slice of ...
 > > 
 > >   type loc' = Cell of char * nativeint * width
 > >             | Slice of ...
 > 
 > A "Cell" requires two more memory words in the latter case.

Thanks for this very helpful reply.

I think for simplicity, we may go with nativeint now.  Another
question: are there any tools that would enable us to track, e.g.,
how much memory is being occupied by instances of "Cell", or even just
how many "Cells" might be live at a given moment?
That way we could evaluate the potential savings in moving to int for
some variants...


Norman



  reply	other threads:[~2001-01-12  9:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-10 18:25 Norman Ramsey
2001-01-11  9:17 ` Cost of polymorphic variants over normal ones Sven LUTHER
2001-01-11 10:40   ` Alain Frisch
2001-01-11 10:44     ` Sven LUTHER
2001-01-11 14:50   ` Jacques Garrigue
2001-01-11 19:14     ` Markus Mottl
2001-01-11 18:34 ` questions about costs of nativeint vs int Xavier Leroy
2001-01-11 22:17   ` Norman Ramsey [this message]
2001-01-12 12:39 Dave Berry
2001-01-14 11:13 ` Xavier Leroy
2001-01-15  2:09   ` John Prevost
2001-01-12 19:53 Brent Fulgham
2001-01-17 13:47 Dave Berry

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=200101112217.f0BMHvv31368@wally.eecs.harvard.edu \
    --to=nr@eecs.harvard.edu \
    --cc=Xavier.Leroy@inria.fr \
    --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).