[
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: | Florian Weimer <fw@d...> |
| Subject: | Re: [Caml-list] mutable record fields and performance |
* j. romildo:
> That is, the expression p.x has different performances for the types
> { x:int } and { mutable x:int } for p?
>
> In summary, what additional cost does the use of mutable imposes on a
> record field?
Internally, record fields are always mutable. Adding a mutable
declaration should not incur a performance cost. perhaps with the
exception that the compiler will see less opportunities for
elimination of common subexpression (but I'm not sure if it performs
this optimization at all).