Browse thread
[Caml-list] Does Caml have slow arithmetics ?
-
Diego Olivier Fernandez Pons
- Richard Jones
-
Basile Starynkevitch [local]
- Diego Olivier Fernandez Pons
-
Evgeny Chukreev
-
Xavier Leroy
- Evgeny Chukreev
-
skaller
-
David Brown
- skaller
- Andreas Rossberg
- Alex Baretta
-
David Brown
- Jon Harrop
-
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: | skaller <skaller@u...> |
| Subject: | Re: Tail calls (Was Re: [Caml-list] Does Caml have slow arithmetics ?) |
On Tue, 2004-07-13 at 03:07, Xavier Leroy wrote: > 2- When the function being tail-called is the current function > (tail recursion). > 3- When the function being tail-called has no more than N arguments, > keeping in mind that a function with free variables has one extra > hidden argument representing its environment. > Proper elimination of tail calls in ocamlopt in all cases is feasible > but requires a bit of work. Can you comment on the effect of -inline switch and inlining in general? If you have let rec f a1 a2 a3 a4 ... = let g b1 b2 ... = f b2 b2 ... in g a1 a2 ... we have situation where the tail call in g isn't to g but to its parent f .. however this is an obvious candidate for inlining, and if we inline g into the body of f, then the tail call is to f, which is itself, which might then be tail-call optimised .. yes? -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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