Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Pixel <pixel@m...>
Subject: Re: [Caml-list] Newbie Ocaml performance questions
Luke Gorrie <luke@bluetail.com> 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.

haha. 

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: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr