Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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:  FAQ:
To unsubscribe, mail  Archives: