[
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: | 2004-05-02 (13:34) |
From: | Jon Harrop <jdh30@c...> |
Subject: | Re: [Caml-list] Functors |
On Sunday 02 May 2004 11:24, Martin Jambon wrote: > On Sun, 2 May 2004, Jon Harrop wrote: > > Functors appear to be somewhat similar to templates in C++. Does the > > functor approach produce more efficient code as it is partially > > specialised over the comparison function? > > Unfortunately no. > ... > http://www.lri.fr/~signoles/ocamldefun/manual.html Wow, ok. So ocamldefun maps ocaml code with functors onto ocaml code without functors and, according to their examples, this can result in an 8 times performance improvement due to inlining. This begs the question: why is this functionality not in the compiler? In fact, using functors with the current compiler actually reduces performance... Cheers, Jon. ------------------- 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