Should be easy enough to test this: -------------------------------------------------------------- iftest.ml let f a b c = if c then a else b let r = f (print_endline "function a"; 'a') (print_endline "function b"; 'b') true;; Printf.printf "r = %c\n" r ---------------------------------------------------------------------- When compiled with ocamlc and run, this prints: function b function a r = a When compiled with ocamlopt -inline 99 and run, this prints: function a function b r = a I examined the assembler output from ocamlopt, and it looks to me like it's doing inlining and significant optimizations. So it all works fine, I think. Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment MONOLITH is an advanced framework for writing web applications in C, easier than using Perl & Java, much faster and smaller, reusable widget-based arch, database-backed, discussion, chat, calendaring: http://www.annexia.org/freeware/monolith/