From fb26630e37354d7454668af27835a2a0d7f8b96d Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 15 Dec 2001 01:11:32 +0000 Subject: [PATCH] index.html: - Fix "Copying Efficiency" section to not imply that memory is ALWAYS allocated on copy. [SVN r12062] --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 160c96e..d807ad7 100644 --- a/index.html +++ b/index.html @@ -50,7 +50,7 @@ And, of course, function pointers have several advantages over Boost.Function:

Function object wrappers will be the size of two function pointers plus one function pointer or data pointer (whichever is larger). On common 32-bit platforms, this amounts to 12 bytes per wrapper. Additionally, the function object target will be allocated on the heap.

Copying efficiency

-

Copying function object wrappers requires allocating member for a copy of the function object target. The default allocator may be replaced with a faster custom allocator if the cost of this cloning becomes prohibitive. +

Copying function object wrappers may require allocating memory for a copy of the function object target. The default allocator may be replaced with a faster custom allocator or one may choose to allow the function object wrappers to only store function object targets by reference (using ref) if the cost of this cloning becomes prohibitive.

Invocation efficiency

With a properly inlining compiler, an invocation of a function object requires one call through a function pointer. If the call is to a free function pointer, an additional call must be made to that function pointer (unless the compiler has very powerful interprocedural analysis).