Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] help
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jdh30@c...>
Subject: Re: [Caml-list] help
On Sunday 25 April 2004 1:45 pm, Henri DF wrote:
> > I deliberately made "wnum" a reference so that it can be set:
> any reason not to make it a mutable ?

No good reason. ;)

I've just been looking at the assembler output from ocamlopt on this. I think 
that a mutable record field represents one fewer levels of indirection 
compared to a reference record field. On a contrived example, using mutable 
is twice as fast.

Comparing a mutable record field to a reference (not in a record), the latter 
comes out as slightly quicker in my timings. But I think this is 
insignificant as the assembler output seems to be identical.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: