Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Alessandro Baretta <a.baretta@s...>
Subject: Re: [Caml-list] Question on performance/style issue
Anil Madhavapeddy wrote:
>>>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.

Ah, yes, it makes one's code dense and legible at once. What I'm asking is 
whether the call to (++) manages to get compiled away--that is, reduced to its 
definition--or if I pay for the additional jump every time. In this latter case 
I might have to renounce the (++) operator in inner loops where I need to 
squeeze out every last bit of performance.

Alex

-- 
*********************************************************************

Ing. Alessandro Baretta

Studio Baretta
http://studio.baretta.com/

Consulenza Tecnologica e Ingegneria Industriale
Technological Consulting and Industrial Engineering

tel. +39 02 370 111 55
fax. +39 02 370 111 54