Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] partial function application perfomance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] partial function application perfomance
From: Arturo Borquez <aborquez@altavista.com>
> I've being doing some benchmarks, and one of my tests
> measures partial function application perfomance. I was
> surprised by results: 20+ times slower than a full
> function application. I expected a greater time but 20 
> times is a lot more ... I've checked my program and
> seems ok, indeed the results were correct. Is this
> overhead normal to partial function applications?

Can you post your code?
If your function is small enough, full application may result in
inlining, and a null cost. If you succeded in having your partial
application have some cost (by doing something which prohibits
inlining), the ratio may be arbitrarily large!

Jacques Garrigue
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr