Browse thread
Question on performance/style issue
[
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: | Anil Madhavapeddy <anil@r...> |
| Subject: | Re: [Caml-list] Question on performance/style issue |
On Fri, Feb 24, 2006 at 04:52:41PM +0100, Alessandro Baretta wrote: > I am very fond of the following "duality" operator. > > let (++) x f = f x > > I use to write complex computations legibly: instead of > > h(g(f(x))) > I write > > x ++ f ++ g ++ h > > What is the impact of the this programming style on execution performance? >From a GC point of view, this is better than the alternative of splitting up the calls into separate let bindings. It's used in the OCaml sources to make some long call-chains look nicer. To reference the original post... http://caml.inria.fr/pub/ml-archives/caml-list/2003/09/825011113899cde2b1b96cf7fc7a0f7b.en.html -- Anil Madhavapeddy http://anil.recoil.org University of Cambridge http://www.cl.cam.ac.uk