From: Christophe Raffalli <raffalli@univ-savoie.fr>
To: Jon Harrop <jon@ffconsultancy.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] record field access
Date: Sat, 21 Oct 2006 16:07:24 +0200 [thread overview]
Message-ID: <453A299C.5050506@univ-savoie.fr> (raw)
In-Reply-To: <200610210823.39902.jon@ffconsultancy.com>
>
> Otherwise, I don't know. I tried a lot of different combinations to try to
> optimise my ray_sphere routine in the ray tracer. I got the impression that
> it can affect register allocation, e.g. no CSE => pulling out {a.x=ax} in a
> pattern requires an extra register but avoids repeated indirection (ax vs
> a.x).
>
>
I think register allocation shoud make the pattern preferable, because
if there are to much registers, one indirection is needed anyway, and
for a record field
there is no need to store the value in the stack, because we know it is
inside the record ?
What I mean is that in
let { l = x } = r in (* l being immutable or not muted in the ...*)
...
x
...
x
...
x
some x may be in register, other may be implemented as r.x, but if
there is not enough registers, the compiler should know
that it does not have to reserve stack space to store x.
Christophe Raffalli
prev parent reply other threads:[~2006-10-21 15:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-21 3:53 j.romildo
2006-10-21 7:23 ` [Caml-list] " Jon Harrop
2006-10-21 14:07 ` Christophe Raffalli [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=453A299C.5050506@univ-savoie.fr \
--to=raffalli@univ-savoie.fr \
--cc=caml-list@inria.fr \
--cc=jon@ffconsultancy.com \
/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).