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; 6+ 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] 6+ messages in thread
* Mini ray tracer
@ 2005-04-28  9:37 Jon Harrop
  2005-05-02 19:48 ` Julian Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Harrop @ 2005-04-28  9:37 UTC (permalink / raw)
  To: caml-list


I just knocked up a little ray tracer in OCaml to test its viability for the 
shootout:

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

Here, it traces a 768^2 image of 66,430 spheres in 22.51s on a 1.2GHz 
Athlon-Thunderbird and in 7.24s on a 1.8GHz Athlon 64.

I've boiled it down to 94 LOC and posted it to the shootout mailing list.

-- 
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] 6+ messages in thread

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

Thread overview: 6+ 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
  -- strict thread matches above, loose matches on Subject: below --
2005-04-28  9:37 Jon Harrop
2005-05-02 19:48 ` Julian Brown

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