Version française
Home     About     Download     Resources     Contact us    
Browse thread
OCaml and Boehm
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] OCaml and Boehm
On Saturday 11 April 2009 15:11:38 Lukasz Stafiniak wrote:
> (Another question which is off-topic for this list is whether smart
> pointers in their situation would be a high performance hit.)

Depends what "their situation" is. :-)

Smart pointers are adequate for specific domains where performance is 
unimportant and cycles cannot occur, like handling the destruction of GUI 
elements. In general, smart pointers are orders of magnitude slower than 
garbage collection because they bump values in the heap every time they 
change hands.

Also, don't forget that many people incorrectly claim that smart pointers 
deallocate at the earliest possible point when, in fact, they typically keep 
values alive longer than necessary.

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e