From: Jon Harrop Date: 2007-06-02T16:40:20+09:00 Subject: Re: Ruby & OCaml (was Re: Underscore) Mauricio Fernandez wrote: > The most recent > IronPython vs. CPython benchmark I've found[1] reveals that the former is > not faster than the latter. Wow. That's absolutely fascinating. I've put a lot of effort into learning the new F# programming language from Microsoft Research. It is derived from the Caml family of functional programming languages and suffers from similar performance trade-offs taken by .NET: 1. Allocation is much slower because the .NET allocator is designed to work with object lifetime distributions typical of C#. 2. Exceptions are 600x slower on .NET and exceptions are ubiquitous in OCaml, used extensively by the stdlib for common cases (e.g. not finding an element in a dictionary). 3. Tail calls are also ubiquitous in functional languages and they are many times slower on the .NET platform. You can ask the compiler to use non-tail calls but then you run the risk of blowing stack. So the differences between OCaml and F# hit worst case in a wide variety of real situations. Very interesting to see that the performance differences are so huge that they even affect interpreted languages. I would not have expected that. -- Dr Jon D Harrop, Flying Frog Consultancy OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?usenet