caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] mutable record fields and performance
Date: Tue, 24 Oct 2006 22:12:07 +0200	[thread overview]
Message-ID: <87psch8odk.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <20061021034125.GA15596@malaquias.gwiceb1> (j. romildo's message of "Sat, 21 Oct 2006 00:41:25 -0300")

* 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).


      reply	other threads:[~2006-10-24 20:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-21  3:41 j.romildo
2006-10-24 20:12 ` Florian Weimer [this message]

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=87psch8odk.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --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).