Hi, everyone,

A new thread can be created using boost thread either from a function or a functor as the entry point of the new thread, as:

void thread_function();
boost::thread thrd(&function);

class functor
{
public:
         inline void operator()();
};
functor f;
boost::thread thrd(f);

Is there a performance difference between these two?

In an ordinary C++ program, can I claim that calling f() 1000 times gives better performance than calling thread_function() 1000 times, because the functor is hinted "inline" even the hint is igored by my compiler? Is f()  the same as a function call in term of performance?

Thanks in advance.

Robert