caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Thomas Fischbacher <Thomas.Fischbacher@Physik.Uni-Muenchen.DE>
To: Jon Harrop <jon@ffconsultancy.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Ray tracer language comparison
Date: Sun, 9 Oct 2005 19:25:43 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.61.0510091859030.29868@eiger.cip.physik.uni-muenchen.de> (raw)
In-Reply-To: <200510091558.16826.jon@ffconsultancy.com>


On Sun, 9 Oct 2005, Jon Harrop wrote:

> On Sunday 09 October 2005 06:26, you wrote:
> > http://www.cip.physik.uni-muenchen.de/~tf/raytracer/
> 
> I reformatted your code with tuareg indentation and 80-char columns to conform 
> with the other implementations for fair comparison,

The longest line in your original code has 79 columns. So does the longest 
line in my code. I do not use any indentation and formatting techniques 
which are not present in your original code as well.

> corrected the bug in a 
> call to printf and removed the superfluous parentheses.

Yes, I was notified of this as well and corrected it in the source. 
Concerning teh extra parens: I like them. Let's just consider this 
artisitc freedom, okay?

> Your code is then 1 
> line shorter and 8x slower than the previous implementation on my site.

What do you mean, "previous implementation"? You provide data for OCaml, 
and I suggested you should include Objective Caml into the comparison as 
well.

> I then rewrote it to be both shorter and faster.

Let us see:

> Printf.printf "P5\n%d %d\n255\n" n n;;
> for y = n - 1 downto 0 do
>   for x = 0 to n - 1 do
>     let g = ref 0. in
>     for dx = 0 to ss - 1 do

Ah. You eliminated the main function. Nice move. I suppose one could 
easily do this for the other implementations as well.



As some people out there seem to wonder what this is all about: 
I maintain the following claim.

- While Jon does not clearly state this on his web page, his main 
  criterion for a valid submission is that it must be impossible to 
  improve by making it both shorter and faster.

- The problem with this methodology is that it does not satisfy even 
  the most fundamental principle one would like to see in a proper comparison:

  If we take a product X, and a product Y, which in fact just again is 
  X, but let us pretend for now and threat them as if they were different,
  then it must not be possible to make a submission for X and a submission 
  for Y that both are valid under all the criteria applied, which lead to
  the conclusion that X is considerably better than Y.

Okay, Jon, you just managed to produce an Objective Caml implementation 
which shows that I am completely wrong, and indeed, Objective Caml is even 
much more succinct than OCaml, while being only about 50% slower than 
OCaml. Why don't you include that important result on your web page?

-- 
regards,               tf@cip.physik.uni-muenchen.de              (o_
 Thomas Fischbacher -  http://www.cip.physik.uni-muenchen.de/~tf  //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y)           V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1))                  (Debian GNU)


  reply	other threads:[~2005-10-09 17:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-03 23:18 Jon Harrop
2005-10-04 13:49 ` [Caml-list] " Thomas Fischbacher
2005-10-09  5:26 ` Thomas Fischbacher
2005-10-09 11:24   ` Yaron Minsky
2005-10-09 13:59     ` Thomas Fischbacher
2005-10-09 17:37       ` Florian Weimer
2005-10-09 18:07         ` Thomas Fischbacher
2005-10-09 14:53   ` Vincenzo Ciancia
2005-10-09 10:19     ` [Caml-list] " Gerd Stolpmann
2005-10-09 11:26       ` sejourne_kevin
2005-10-09 14:58   ` [Caml-list] " Jon Harrop
2005-10-09 17:25     ` Thomas Fischbacher [this message]
2005-10-09 14:38 yoann padioleau
2005-10-09 16:00 ` Chris Campbell

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=Pine.LNX.4.61.0510091859030.29868@eiger.cip.physik.uni-muenchen.de \
    --to=thomas.fischbacher@physik.uni-muenchen.de \
    --cc=caml-list@yquem.inria.fr \
    --cc=jon@ffconsultancy.com \
    /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).