Re: [Caml-list] Tuple allocation overhead

2008-08-12 Thread Matthew William Cox
On Tue, Aug 12, 2008 at 11:08:58AM -0500, Raj Bandyopadhyay wrote: > I was wondering if someone has a good explanation for this. I assume it > has to do with some overhead of malloc, but I'm not sure. I doubt it's anything to do with malloc. The ocaml runtime does its own memory management, whic

Re: [Caml-list] Tuple allocation overhead

2008-08-12 Thread Gerd Stolpmann
Raj Bandyopadhyay said: > Hi folks > > I was performing a little experiment to try and quantify some of the > overhead of memory allocation in OCaml. Here is a the kind of little > program that I am using for timings: This experiment does not make much sense. Ocaml has its own memory management f

[Caml-list] Tuple allocation overhead

2008-08-12 Thread Raj Bandyopadhyay
Hi folks I was performing a little experiment to try and quantify some of the overhead of memory allocation in OCaml. Here is a the kind of little program that I am using for timings: let rec alloc3 n l = if n = 0 then l else alloc3 (n-1) ((1,2,n)::l) The alloc3 function allocates a tu