caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Mini ray tracer
@ 2005-06-13  2:46 Jon Harrop
  2005-06-13  3:24 ` [Caml-list] " Alex Goldman
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Harrop @ 2005-06-13  2:46 UTC (permalink / raw)
  To: caml-list


I've been fiddling with my ray tracer again this weekend. This time I've come 
up with a comparison of four different (progressively optimised) versions of 
the ray tracer implemented in C++, Java, OCaml and SML:

  http://www.ffconsultancy.com/free/ray_tracer/languages.html

OCaml is significantly more concise that the other languages (even SML) but 
the big surprise for me was the incredible performance of straightforwardly- 
written Mlton-compiled SML, even on AMD64 where it lacks a native code-gen.

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Mini ray tracer
  2005-06-13  2:46 Mini ray tracer Jon Harrop
@ 2005-06-13  3:24 ` Alex Goldman
  2005-06-16  6:20   ` Jon Harrop
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Goldman @ 2005-06-13  3:24 UTC (permalink / raw)
  To: Jon Harrop; +Cc: caml-list

>   http://www.ffconsultancy.com/free/ray_tracer/languages.html

Thanks. A lot of very interesting stuff there. I'm surprised that
SMLNJ is as fast as OCamlopt on x86. I thought it had a reputation for
being slow because it's "continuations-based" (or whatever). Java is
the only one bytecode-compiled, so it's also interesting that it's
competitive in speed.

It might be interesting to see how C/C++ does when linked with Boehm's
GC. My own experiments with it impressed me very much.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Mini ray tracer
  2005-06-13  3:24 ` [Caml-list] " Alex Goldman
@ 2005-06-16  6:20   ` Jon Harrop
  2005-06-16 15:41     ` Jon Harrop
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Harrop @ 2005-06-16  6:20 UTC (permalink / raw)
  To: caml-list

On Monday 13 June 2005 04:24, Alex Goldman wrote:
> >   http://www.ffconsultancy.com/free/ray_tracer/languages.html
>
> Thanks. A lot of very interesting stuff there. I'm surprised that
> SMLNJ is as fast as OCamlopt on x86...

Ahem, it seems that the evil Matthias Blume worked an ingenious bug into his 
SML port of my ray tracer which sped it up by 70%. So I've redone the study 
and SML is now much less favourable.

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Mini ray tracer
  2005-06-16  6:20   ` Jon Harrop
@ 2005-06-16 15:41     ` Jon Harrop
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Harrop @ 2005-06-16 15:41 UTC (permalink / raw)
  To: caml-list

On Thursday 16 June 2005 07:20, Jon Harrop wrote:
> On Monday 13 June 2005 04:24, Alex Goldman wrote:
> > >   http://www.ffconsultancy.com/free/ray_tracer/languages.html
> >
> > Thanks. A lot of very interesting stuff there. I'm surprised that
> > SMLNJ is as fast as OCamlopt on x86...
>
> Ahem, it seems that the evil Matthias Blume worked an ingenious bug into
> his SML port of my ray tracer which sped it up by 70%. So I've redone the
> study and SML is now much less favourable.

Matthias is denying all knowledge of this so I guess I'll have to take 
responsibility myself. Anyhow, I've updated the language comparison with a 
table comparing OCaml and SML:

  http://www.ffconsultancy.com/free/ray_tracer/languages.html

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-06-16 15:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-13  2:46 Mini ray tracer Jon Harrop
2005-06-13  3:24 ` [Caml-list] " Alex Goldman
2005-06-16  6:20   ` Jon Harrop
2005-06-16 15:41     ` Jon Harrop

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).