[Gllug] OSS CMSs

Tim Towers tt at createservices.com
Fri May 13 10:43:50 UTC 2005


> -----Original Message-----
> From: gllug-bounces at gllug.org.uk 
> [mailto:gllug-bounces at gllug.org.uk] On Behalf Of Richard Jones
> Sent: Tuesday, May 03, 2005 10:33 AM
> To: Greater London Linux User Group
> Subject: Re: [Gllug] OSS CMSs
> 
> Follow-up.  A line-by-line comparison between a 66 line OCaml program
> and a 98 line C++ program for doing ray tracing:
> 
> http://www.ffconsultancy.com/free/ray_tracer/comparison.html
> 
> Rich.
> 

Though I did like the programming style of the OCaml program, this
comparison did not appear totally unbiased to me.

The context colouring of the OCaml didnt seem a fair presentation compared
to the plain C++. Also, are doubles in C++ the same size as floats on OCaml?
That could explain the difference in relative speeds between the 32bit and
64 bit platforms as shown on the web page.

In the interests of curiosity I carried out some tests:

compiling the C++ version and a modified "s/double/float/g" version
indicates that the difference between using each of the structures reduces
the unoptimised runtime on my P4 32bit workstation from 129 seconds to 54
seconds.

Optimisation brought the C++ runtime down from 129 seconds to 49.
Optimisation improved the ocaml version down from 49 to 30 seconds.

More worrying, the output files between the different versions differed,
which indicates a worrying lack of consistency.

Tim Towers
Create Services Ltd

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list