Google Groups Home
Help | Sign in
Message from discussion Ray tracer in Stalin
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Kjetil Svalastog Matheussen  
View profile
 More options 14 Aug 2005, 23:44
Newsgroups: comp.lang.scheme
From: Kjetil Svalastog Matheussen <kjet...@notam02.no>
Date: Mon, 15 Aug 2005 00:44:53 +0200
Local: Sun 14 Aug 2005 23:44
Subject: Re: Ray tracer in Stalin

On Sun, 14 Aug 2005, Jon Harrop wrote:

> I've just done a little benchmarking of the ray tracer written in Scheme and
> compiled using Stalin. Here are the results. On x86 (900MHz Athlon T-bird):

> $ g++ -O3 -march=athlon-tbird -ffast-math ray.cpp -o ray
> $ time ./ray 6 160 >image.pgm
> real    0m2.152s

> $ mlton ray.sml
> $ time ./ray 6 160 >image.pgm
> real    0m2.435s

> $ ocamlopt -inline 100 -ffast-math ray.ml -o ray
> $ time ./ray 6 160 >image.pgm
> real    0m3.255s

> $ stalin -d0 -d1 -d5 -d6 -On -q -d -architecture IA32-align-double
> -no-clone-size-limit -split-even-if-no-widening -copt -O2 -copt
> -fomit-frame-pointer -copt -malign-double ray
> $ time ./ray 6 160 >image.pgm
> real    0m3.712s

> On AMD64 (1.8GHz Athlon64):

> $ g++ -O3 -march=athlon-tbird -ffast-math ray.cpp -o ray
> $ time ./ray 6 160 >image.pgm
> real    0m0.987s

> $ mlton ray.sml
> $ time ./ray 6 160 >image.pgm
> real    0m1.056s

> $ ocamlopt -inline 100 -ffast-math ray.ml -o ray
> $ time ./ray 6 160 >image.pgm
> real    0m1.037s

> $ stalin -d0 -d1 -d5 -d6 -On -q -d -architecture IA32-align-double
> -no-clone-size-limit -split-even-if-no-widening -copt -O2 -copt
> -fomit-frame-pointer -copt -malign-double ray
> $ time ./ray 6 160 >image.pgm
> real    0m1.773s

> I hadn't expected a simple Lisp or Scheme implementation to be able to
> compete in terms of performance but only 70% slower on 32-bit AMD64 when
> C++ and OCaml are fully 64-bit is very impressive, IMHO.

Its a shame theres so much difference. Would be interesting
to see what results cmucl or sbcl gives. Have you posted a
request to comp.lang.lisp?

Anyway, perhaps you could try the following options for stalin? I got
better results with these:

   -d0 -d1 -d5 -d6 -On -k -Ob -Om -Or -Ot -q -d -architecture
IA32-align-double -no-clone-size-limit -split-even-if-no-widening -copt
-O3 -copt -fomit-frame-pointer
-copt -malign-double -copt -ffast-math -copt -freg-struct-return

--


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google