[Gllug] OSS CMSs

Richard Jones rich at annexia.org
Fri May 13 11:24:10 UTC 2005


On Fri, May 13, 2005 at 11:43:50AM +0100, Tim Towers wrote:
> Though I did like the programming style of the OCaml program, this
> comparison did not appear totally unbiased to me.

It is done by an OCaml consultant based in Cambridge, for advocacy
purposes :-)

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

Yes, float in OCaml is a double in C (8 bytes).

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

Which isn't fair - see above.

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

It's definitely possible to optimise C and C++ programs so that
they're faster than OCaml programs.  In the same way, it's possible to
write assembly programs that are faster than anything [except
downloading microcode perhaps?].  The point is that hardly anyone
writes stuff in assembly any more because it's time consuming, and (we
believe) writing stuff in low level languages like C and C++ is not
generally a good idea either.

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

I don't know if ray tracing is an exact science, but if concerned you
should send feedback to Jon or to the language shootout page.

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list