caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
To: Anders Peter Fugmann <anders@fugmann.net>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Exceptions and backtraces
Date: Thu, 10 Sep 2015 11:45:56 +0200	[thread overview]
Message-ID: <CAGrdgiVLt1XFF1XXA8vhB0WAkAhC2DGciTDoKNGKku842iJrZw@mail.gmail.com> (raw)
In-Reply-To: <55F08FB2.2090103@fugmann.net>

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

On Wed, Sep 9, 2015 at 9:59 PM, Anders Peter Fugmann <anders@fugmann.net>
wrote:

> It just occurred to me that the functions I made are tail recursive and
> which is why the middle function call is eliminated.


Or even worse, tail calling. This, and aggressive inlining are the two
things which most often rears its ugly head when hunting for why a piece of
code is breaking some invariant. You have to "guess" at what the compiler
did to the code base and reconstruct the code path from this.

On the other hand, you don't want to lose either of those two optimizations.

I agree it is worthwhile to document both behaviours.


-- 
J.

[-- Attachment #2: Type: text/html, Size: 1136 bytes --]

  reply	other threads:[~2015-09-10  9:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 19:18 Anders Peter Fugmann
2015-09-09 19:59 ` Anders Peter Fugmann
2015-09-10  9:45   ` Jesper Louis Andersen [this message]
2015-09-10 10:54     ` Anders Fugmann
2015-09-10 11:09       ` Jesper Louis Andersen

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=CAGrdgiVLt1XFF1XXA8vhB0WAkAhC2DGciTDoKNGKku842iJrZw@mail.gmail.com \
    --to=jesper.louis.andersen@gmail.com \
    --cc=anders@fugmann.net \
    --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).