Monday, 31 December 2007

C++ vs OCaml: Ray tracer language comparison

One of our older free articles about OCaml recently resurfaced in terms of popularity, being cited from numerous French discussion forums.

This page compares and contrasts implementations of a small ray tracer in C++ and in OCaml. The resulting implementations show how easily succinct and efficient programs can be constructed in the OCaml programming language, even matching the performance of well-written C++.

For a detailed discussion of optimization in OCaml, read our book OCaml for Scientists.

No comments: