From: James Pickens Date: Thu, 18 Dec 2008 21:42:21 GMT Subject: Re: [RFC PATCH 0/2] Add support for multi threaded checkout Message-ID: <885649360812181342u2978038fj3a11670acd9fd873@mail.gmail.com> In-Reply-To: <494ABDC9.9060001@morey-chaisemartin.com> On Thu, Dec 18, 2008 at 2:16 PM, Nicolas Morey-Chaisemartin wrote: > 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. I had looked at it before but didn't record any numbers. I just took the following timings (2 runs each): master 13.78 12.79 threads enabled 16.84 20.45 threads disabled 14.07 13.27 James