RE: [Caml-list] about OcamIL

2010-05-19 Thread forum
Jon Harrop jonathandeanhar...@googlemail.com a écrit : (...) I don't think this is heated at all. We were talking about high performance languages and you cited a bunch of languages that get whipped by Python on this benchmark:

[Caml-list] recursive module and types

2010-05-19 Thread Christophe Raffalli
Hello, I needed to define a (large) recursive type using sets basically as in the example below. What I do not like is that I need to repeat the definition of the type twice (in my real code the type is 100 lines long) ... Does anyone see a way to avoid it, apart from using parametric

[Caml-list] OCaml defunctorization and other optimizations

2010-05-19 Thread Török Edwin
Hi, I've seen in several places recommendations to use 'ocamldefun' to speed up OCaml programs that use functors heavily [*]. I was able to find the sources via the wayback machine. Unsurprisingly it doesn't build with OCaml 3.11.2 (it wants OCaml 3.06). Is there a more up to date variant of

Re: [Caml-list] Re: about OcamIL

2010-05-19 Thread Eray Ozkural
On Wed, May 19, 2010 at 2:29 PM, Michael Ekstrand mich...@elehack.net wrote: Yes, Python's hash tables are particularly optimized due to their wide pervasive usage.  When you're testing Python hash tables, you're really testing a carefully-written, thoroughly-tuned C implementation of hash

RE: [Caml-list] Re: about OcamIL

2010-05-19 Thread David Allsopp
Eray Ozkural wrote: On Wed, May 19, 2010 at 2:29 PM, Michael Ekstrand mich...@elehack.net wrote: Yes, Python's hash tables are particularly optimized due to their wide pervasive usage.  When you're testing Python hash tables, you're really testing a carefully-written, thoroughly-tuned C

Re: [Caml-list] Re: about OcamIL

2010-05-19 Thread Erick Tryzelaar
On Wed, May 19, 2010 at 6:35 AM, David Allsopp dra-n...@metastack.comwrote: There are two pretty viable alternatives for running OCaml code in a web browser - ocamljs[1] is a JavaScript backend for ocamlopt and O'Browser[2] which is a JavaScript implementation of the OCaml bytecode

Re: [Caml-list] Re: about OcamIL

2010-05-19 Thread Goswin von Brederlow
Eray Ozkural examach...@gmail.com writes: On the other hand, Jon's notion of high performance is valid I think. You want to be as close to the metal as possible. Otherwise there is no point in, say, writing a parallel version of the code. In the past we thought that was only possible with C

Re: [Caml-list] Re: about OcamIL

2010-05-19 Thread Goswin von Brederlow
David Allsopp dra-n...@metastack.com writes: Eray Ozkural wrote: On Wed, May 19, 2010 at 2:29 PM, Michael Ekstrand mich...@elehack.net wrote: Yes, Python's hash tables are particularly optimized due to their wide pervasive usage.  When you're testing Python hash tables, you're really

Re: [Caml-list] recursive module and types

2010-05-19 Thread Alain Frisch
On 05/19/2010 02:24 PM, Christophe Raffalli wrote: Does anyone see a way to avoid it I propose: module rec T : sig type t = U.t val compare : t - t - int end = struct include U let compare u v = match u, v with Leaf, Leaf - 0 | Node u', Node v' - S.compare u' v' | Leaf, Node

RE: [Caml-list] about OcamIL

2010-05-19 Thread Jon Harrop
Xavier Clerc wrote: Jon Harrop jonathandeanhar...@googlemail.com a écrit : I don't think this is heated at all. We were talking about high performance languages and you cited a bunch of languages that get whipped by Python on this benchmark:

[Caml-list] Problem with recursive class and non-class types

2010-05-19 Thread Goswin von Brederlow
Hi, I want to define the two types below: type foo = { bar : bar; } class bar = object val mutable foo : foo list = [] end Is there another way of doing this other than: # type 'a foo = { bar : 'a; } class bar = object val mutable foo : #bar foo list = [] end;; type 'a foo = { bar : 'a; }