[Shootout-list] Ray tracer

Jon Harrop jon@ffconsultancy.com
Sat, 18 Jun 2005 17:01:50 +0100


On Saturday 18 June 2005 16:45, Isaac Gouy wrote:
> Seems like you just did enforce your own subjective belief!

How so?

> The ray-tracer programs started out with the same algorithm. Some of us
>  wasted our time working on missing interpreted/bytecode languages to
> get ray-tracer off The Sandbox and onto the main pages,

I can't see that anyone has wasted their time. Everyone else's submissions are 
well over 100 LOC so there is no room for extra algorithms.

> and then others 
> started contributing programs in the usual way - and now you've
> pulled-the-rug from under them.

Not at all, if their submissions generate the correct result then they are 
valid. You won't see me saying "oh but he cheated because he used a template, 
referee Brent". ;-)

BTW, I think we should fix the "even N" thing before the ray tracer leaves the 
sandbox.

> > > If two different algorithms (and two
> > > different data structures, etc.) are compared, how
> > > can we determine what amount of the delta in
> > > performance is due to algorithms versus the compiler
> > > implementation?
> >
> > Users can profile the implementations to determine where the time is
> > actually spent.
>
> In other words, no one looking at ray-tracer on the website will have
> the slightest idea whether some programs simply use a better algorithm.

If the shootout chooses to adopt this approach then I think it should be 
explicitly stated. But yes, if people inherently believe that different 
programs doing the same thing must be using the same algorithm then they'll 
get it wrong on my ray tracer just as they'll get it wrong on most other 
programs (including those in the shootout).

I just grepped for OCaml's Hashtbl and I see 5 tests using it. Do you know how 
it works, what hashing algorithm it uses, what its internal data structure 
is? Do we care?

> > I appreciate the desire to compare seemingly equivalent programs but
> > this is simply not possible in general and, consequently, must be
> > dismissed.
>
> We do compare "seemingly" equivalent programs.

You try to and you get differing answers because of the fundamental flaw we're 
pointing out.

> We deal with the particular, not the general.

I bet even you can't tell what these particular programs are actually doing, 
Isaac. :-)

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists