Browse thread
Execution time of class versus record
[
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: | Jonathan Bryant <jtbryant@v...> |
| Subject: | Re: [Caml-list] Execution time of class versus record |
On Jun 25, 2007, at 8:07 AM, Jon Harrop wrote: > > For the same reason, there is a difference between: > > type t = A of int * int > > and: > > type t = A of (int * int) > > The former is unboxed and the latter is boxed (a reference to a > pair). The > boxing can degrade performance (it can also improve performance!). I've always been a little curious about this. Is performance the _only_ reason for this distinction? Construction and pattern matching on the two are identical, and AFAIK neither doesn't allow partial application. --Jonathan