caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl>
To: caml-list@inria.fr
Subject: Re: [Caml-list] ackermann test
Date: Wed, 09 Feb 2005 15:00:14 +0100	[thread overview]
Message-ID: <87vf91kf4h.fsf@qrnik.zagroda> (raw)
In-Reply-To: <1107956075.5022.593.camel@pelican.wigram> (skaller@users.sourceforge.net's message of "10 Feb 2005 00:34:36 +1100")

skaller <skaller@users.sourceforge.net> writes:

> I only have gcc 3.2.2.  With -fomit-frame-pointer and -O3 and -static
> for the new C:
>
>        new C  w/o old C  new Felix  old Felix  HACKED  Ocamlopt Ocamlb
> y=10    0.5   0.8    1.8       2.9          7     10      0.4     12 
> y=11    7.4   12.5  16        28           55     75      2       50
> y=12   64     98   113       180          290    370      9      220

A further speedup in C:

__attribute__((regparm(2)))
int ack(int x, int y) {
   ...
}

BTW, gcc -O2 and -O3 give the same code here.

gcc generates some redundant register moves (I guess regparm is not
optimized as well as it could because it's not common), so ocamlopt
is still marginally faster.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


  reply	other threads:[~2005-02-09 14:00 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
2005-02-09 13:34         ` skaller
2005-02-09 14:00           ` Marcin 'Qrczak' Kowalczyk [this message]
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=87vf91kf4h.fsf@qrnik.zagroda \
    --to=qrczak@knm.org.pl \
    --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).