Boost logo

Boost Users :

Subject: Re: [Boost-users] Why does bind have overhead?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-06-04 10:31:39


AMDG

Joseph Garvin wrote:
> I've read that bind can have significant overhead unless your
> parameters are small (because then it can use the small buffer
> optimization).

I think that you're confusing bind with function.
bind doesn't do any dynamic memory allocation,
so the small buffer optimization doesn't make sense for it.

> But why does it have anymore overhead than copying the
> parameters and assigning a function pointer? I suspect support for
> something (maybe member function pointers + multiple inheritance?) is
> responsible but I'm not sure what. I tried looking through bind.hpp
> but trying to figure out what it's actually doing amongst all the
> compiler workarounds and different parameter versions it's difficult
> to tell what's going on.
>

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net