Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
OCaml efficiency/optimization?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] OCaml efficiency/optimization?
On Friday 28 October 2005 11:21, Tato Thetza wrote:
> I've been reading over
> and have learned
> two things:
> -lists are immutable and singly linked, which explains why 1::[2;3] is
> valid while [2,3]::1 is not, and why its efficient.
> -the proper way to ensure tail-recursive optimization
> question: are these and other optimizations documented somewhere
> officially?

I don't know if it classifies as "official", but my OCaml book has a chapter 
on optimisation that covers tail recursion.

> I find it a little uncomfortable I've been learning OCaml 
> without knowning such internal details. Any secrets I should definitely
> know if I were to use this language in production?

We write high-performance OCaml programs for various different applications, 
including scientific computing and graphics. IMHO, OCaml is just like any 
other language with regard to optimisation. One important difference is that 
the OCaml community are very friendly and helpful, which makes it much easier 
to get accurate information when you need it.

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists