Browse thread
[Caml-list] strange tail recursion behavior by caml compiler
-
S. Ted Sandler
- Damien Doligez
- Xavier Leroy
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Xavier Leroy <Xavier.Leroy@i...> |
| Subject: | Re: [Caml-list] strange tail recursion behavior by caml compiler |
> So here's the problem. When I write listbest like > this, it's not tail recursive. I get stack overflow > exceptions on long lists: Your two versions of listbest are both tail-recursive, even on a register-starved x86 processor, as shown by a quick look at the asm generated by ocamlopt. Either you've simplified your code a little too much before posting, or the stack overflow comes from elsewhere in your code. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners