English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Question on performance/style issue
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-02-24 (19:05)
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...

Anil Madhavapeddy                                 http://anil.recoil.org
University of Cambridge                          http://www.cl.cam.ac.uk