Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Are multiple return values optimized?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] Are multiple return values optimized?
> Are multiple return values optimized to avoid heap-allocation 
> like curried functions are?

No, a tuple of results is always heap-allocated.  However, with
Caml's generational GC, the cost of allocating such short-lived tuples
is quite low.

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