From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ackermann test
Date: Wed, 9 Feb 2005 12:17:31 +0100 [thread overview]
Message-ID: <20050209111730.GB449@first.in-berlin.de> (raw)
In-Reply-To: <87vf92qe28.fsf@qrnik.zagroda>
On Wed, Feb 09, 2005 at 10:26:39AM +0100, Marcin 'Qrczak' Kowalczyk wrote:
> skaller <skaller@users.sourceforge.net> writes:
>
> >> Where can I find the C code you are using?
> >
> > int ack(int x, int y) {
> > return x==0? y+1: (y==0? ack(x-1,1):ack(x-1,ack(x,y-1)));
> > }
>
> If you write it like this:
>
> int ack(int x, int y) {
> if (x==0) return y+1;
> if (y==0) return ack(x-1,1);
> return ack(x-1,ack(x,y-1));
> }
>
> then gcc-3.4.3 generates better code (optimizes tail calls).
> -fomit-frame-pointer further speeds it up.
Would be nice to have the comlete benchmark again - now with this
code (or with an added row for this C-Code).
So we can compare, what reults will yielded by that different code
on the same platform for which we saw the other benchmark values.
Ciao,
Oliver
next prev parent reply other threads:[~2005-02-09 11:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-09 3:57 skaller
2005-02-09 4:09 ` [Caml-list] " Michael Walter
2005-02-09 4:13 ` skaller
2005-02-09 9:26 ` Marcin 'Qrczak' Kowalczyk
2005-02-09 11:17 ` Oliver Bandel [this message]
2005-02-09 13:34 ` skaller
2005-02-09 14:00 ` Marcin 'Qrczak' Kowalczyk
2005-02-09 15:55 ` skaller
2005-02-09 16:51 ` Jon Harrop
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=20050209111730.GB449@first.in-berlin.de \
--to=oliver@first.in-berlin.de \
--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;
as well as URLs for NNTP newsgroup(s).