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
Memory allocation nano-benchmark.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-10 (15:00)
From: John Prevost <j.prevost@g...>
Subject: Re: [Caml-list] Memory allocation nano-benchmark.
On Thu, 10 Feb 2005 16:15:10 +0100, Christian Szegedy
<> wrote:
> Let us look at another example where ocaml not really shines:

Er.  Or perhaps we should not?  I could not imagine writing anything
even vaguely similar to these examples in either C or in O'Caml.

Not to mention the serious problem with evaluating memory allocation
overhead by comparing programs that allocate massive amounts of memory
but never use or release any of it.

In a program that allocates many small short-lived chunks of memory, I
suspect you will find that *in practice*, O'Caml performs better than

In a program that allocates one very large chunk of memory, I suspect
you will find that both C and O'Caml do a lot better when... you
allocated as one very large chunk of memory (or, if need be, a *tiny*
number of large chunks) instead of as many small chunks of memory.