From: Pierre Weis <pierre.weis@inria.fr>
To: siegfried.gonzi@kfunigraz.ac.at (Siegfried Gonzi)
Cc: caml-list@inria.fr, siegfried.gonzi@kfunigraz.ac.at
Subject: Re: [Caml-list] Some clarifications to the language shootout page
Date: Tue, 26 Nov 2002 14:22:23 +0100 (MET) [thread overview]
Message-ID: <200211261322.OAA28075@pauillac.inria.fr> (raw)
In-Reply-To: <3DE34238.9050804@kfunigraz.ac.at> from Siegfried Gonzi at "Nov 26, 102 10:43:20 am"
Hi list,
Here is the conclusion of our mail exchange with Manuel:
> ====
> Just one more thing, I have changed the Scheme code a very little bit to
>
> make it more similar to the Caml code. That is, I have changed the
> construction of the row vectors. The original initialization
>
> (mx (make-vector rows 0.0))
>
> was breaking the CFA because mx what not
> correctly typed vector of vector of double. I have replaced it with:
>
> (mx (make-vector rows (make-vector 0 0.0)))
>
> Then, you should compile with:
>
> bigloo -v2 -Obench foo.scm -copt "-O3 -fomit-frame-pointer"
>
> On my machine with this two modifications I see an improvement of about 17%.
> It is still insufficient to defeat Ocaml but we are getting a little closer [:-)]
>
> --
> Manuel
Hi Manuel,
As you should have noticed, I did not try to optimize anything in the
Caml code: I just tried a litteral translation from Scheme to Caml. In
effect, the original Caml code was not optimally clear (difficult to
read and difficult to compile) and was compared to a (relatively)
clear Scheme code. Mere translation of the Scheme code to Caml just
improves the runtime by a factor of 2 or so. As you surely know
already, I was obliged to change the initialization, since
(mx (make-vector rows 0.0))
is ill-typed in Caml.
This is amazing that now this well-typed Caml version, once translated
back to Scheme, improves the original Scheme version!
I think that this proves, once more, that our languages are not as
different as people think they are :)
Cheers,
Pierre Weis
INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-11-26 13:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-25 9:01 Siegfried Gonzi
2002-11-25 10:23 ` Pierre Weis
2002-11-25 13:03 ` Siegfried Gonzi
2002-11-25 11:09 ` Siegfried Gonzi
2002-11-26 9:43 ` Siegfried Gonzi
2002-11-26 13:22 ` Pierre Weis [this message]
2002-11-27 20:50 isaac gouy
2002-11-29 8:32 ` Siegfried Gonzi
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=200211261322.OAA28075@pauillac.inria.fr \
--to=pierre.weis@inria.fr \
--cc=caml-list@inria.fr \
--cc=siegfried.gonzi@kfunigraz.ac.at \
/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