caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* questions about costs of nativeint vs int
@ 2001-01-10 18:25 Norman Ramsey
  2001-01-11  9:17 ` Cost of polymorphic variants over normal ones Sven LUTHER
  2001-01-11 18:34 ` questions about costs of nativeint vs int Xavier Leroy
  0 siblings, 2 replies; 8+ messages in thread
From: Norman Ramsey @ 2001-01-10 18:25 UTC (permalink / raw)
  To: caml-list

We're designing interfaces for tools that will sometimes have to
manipulate 32-bit integers, but will often be able to make do with the
limited precision provided by the int type.  I would love to get some
information about the relative cost of int vs nativeint in both
parameter passing and datatype representation.

For example, what are the relative costs (e.g., memory requirements)
of these two definitions?

  type loc = Cell of char * int * width
           | Slice of ...

  type loc' = Cell of char * nativeint * width
            | Slice of ...

As another example, what are the costs of calling these functions:

  type t
  val add  : rd:int       -> rs1:int       -> rs2:int       -> t
  val add' : rd:nativeint -> rs1:nativeint -> rs2:nativeint -> t

To extend the question, what happens if I use int32 or int64 in place
of nativeint?


Finally, a procedural question: should I be posting these sorts of
questions to comp.lang.ml instead of sending them to
caml-list@inria.fr?


Thanks in advance for any help!


Norman



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-01-12  9:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-10 18:25 questions about costs of nativeint vs int 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 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).