From: "Andrew I. Schein" <andrew@andrewschein.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] break and continue for OCaml
Date: Thu, 10 Apr 2008 23:44:33 -0400 [thread overview]
Message-ID: <c6377c1e0804102044y1bb19c2fn7e7e17afe2d3d954@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 909 bytes --]
I took the exception approach in a camlp4 macro: pa_breakcont
http://code.google.com/p/ocaml-break-continue/
There are timings before/after on the wiki section of that page that
demonstrate the overhead.
Also, pa_breakcont changes rather than adds to the grammar increasing
likelihood of conflict with other extensions.
Hopefully, Sanghyeon can fix both of these drawbacks with his approach.
-Andy
> On Thu, Apr 10, 2008 at 04:12:49PM +0200, David Allsopp wrote:
> > Is there therefore any reasonable performance gain over implementing
> > break/continue as a camlp4 extension rather than as a compiler patch?
>
> The posted patch turns the break/continue into jump instructions
> (well, jump bytecodes), which should be moderately faster than pushing
> an exception stack frame / unwinding the stack.
>
> Rich.
>
> --
> Richard Jones
> Red Hat
>
>
--
Andrew I. Schein
web: www.andrewschein.com
[-- Attachment #2: Type: text/html, Size: 1329 bytes --]
next reply other threads:[~2008-04-11 3:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-11 3:44 Andrew I. Schein [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-04-10 1:59 Sanghyeon Seo
2008-04-10 7:09 ` [Caml-list] " Luc Maranget
2008-04-10 7:11 ` Jean-Christophe Filliâtre
2008-04-10 14:12 ` David Allsopp
2008-04-10 14:41 ` Richard Jones
2008-04-10 13:39 ` Richard Jones
2008-04-10 14:05 ` Martin Jambon
2008-04-10 14:19 ` Richard Jones
2008-04-10 14:24 ` Michael Wohlwend
2008-04-10 14:35 ` Martin Jambon
2008-04-10 14:38 ` Michael Wohlwend
2008-04-10 22:23 ` Florian Weimer
2008-04-10 20:35 ` Eric Cooper
2008-04-11 0:14 ` Micha
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=c6377c1e0804102044y1bb19c2fn7e7e17afe2d3d954@mail.gmail.com \
--to=andrew@andrewschein.com \
--cc=caml-list@yquem.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