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
[Caml-list] Newbie Ocaml performance questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-08-06 (03:04)
From: Pixel <pixel@m...>
Subject: Re: [Caml-list] Newbie Ocaml performance questions
Luke Gorrie <> writes:


> - Is there an easy way to measure the number of milliseconds it takes
>   to evaluate a certain expression?

As for me, the best solution to find out which program part takes time is to
call the part twice or thrice and note the difference on the whole program
execution time.
- ocamlcp is nice but doesn't give timings
- the output of gprof is usually very hard to use (mainly due to "cycles")


> - Can I increase the stack size (for native and bytecode)? It seems to
>   blow out on me at a depth of about 70,000 in simple functions - I'd
>   like to be able to get about 100x deeper.


We (Equipe de merd team) had to remove quite a few non tail-recursive
functions to help stay in the stack.

For bytecode, this works:
Gc.set { (Gc.get()) with Gc.stack_limit = 50 * 1024 * 1024 }
Bug reports:  FAQ:
To unsubscribe, mail  Archives: