[Shootout-list] Ray tracer

Jon Harrop jon@ffconsultancy.com
Thu, 16 Jun 2005 18:20:07 +0100


On Monday 13 June 2005 08:18, Jos=E9 Bollo wrote:
> I have a question of detail:
>
> 	I see in the C++ listing that you desallocate the memory.
> 	It is not needed before exiting.
> 	But is it a shootout rule to desallocate?
> 	What would be the comparison without desallocating?

If you assume that the OS will deallocate for you then, on Linux, it is=20
slightly faster. However, I think the programs should be properly written...

=46or the record, our site now contains several different versions of the r=
ay=20
tracers in different languages:

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

In particular, there are C++, OCaml and MLton versions which are more than=
=20
twice as fast as those on the shootout. There is also a Java version which =
is=20
similarly faster than the one I submitted a few weeks ago.

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