Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Currying vs Speed
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Magesh Kannan <magesh@i...>
Subject: [Caml-list] Currying vs Speed
Hi All,

Does currying one of the arguments to a function provide any run-time 
performance improvements?

In the following code fragment,

let my_func arg1 arg2 arg3 =
  let res = arg1 + arg2 + arg3 in
    res

let my_func_wrapper arg1 arg2 arg3 =
  my_func arg1 arg2 arg3

let my_func_part = my_func 5

Does the invocation (my_func_part 10 20) run any faster than
(my_func_wrapper 5 10 20)?

Thanks,
Magesh

-------------------
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