From: Nicolas Morey-Chaisemartin Date: Thu, 18 Dec 2008 21:16:57 GMT Subject: Re: [RFC PATCH 0/2] Add support for multi threaded checkout Message-ID: <494ABDC9.9060001@morey-chaisemartin.com> In-Reply-To: <3BA20DF9B35F384F8B7395B001EC3FB3265B2A01@azsmsx507.amr.corp.intel.com> Pickens, James E a écrit : > Even in that case it will have *some* impact > from locking/unlocking the mutex, but I think it would be in the noise. > > James > - I guess you could do something like : #define checkout_lock() core_threaded_checkout ?pthread_mutex_lock(&checkout_mutex) : (void) 0 #define checkout_unlock() core_threaded_checkout ?pthread_mutex_unlock(&checkout_mutex) : (void) 0 It should be faster when you don't actually use threaded checkouts, as you won't unnecessarily lock/unlock your mutex. Have you looked at the perf from local to local? I'm just curious. Nicolas Morey-Chaisemartin