RE: svn commit: r1568062 - /subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
From: Bert Huijben <bert_at_qqmail.nl>
Date: Fri, 14 Feb 2014 00:52:52 +0100
> -----Original Message-----
Why do you create a mutex when a simple atomic increment as suggested earlier in this thread would work just fine?
An atomic increment is 100% implemented in most CPUs with a single operation while the callback infrastructure you now use for the call, can't be inlined... and even involves a few DLLs in our usual shared library setup and in some cases even involves kernel operations. The number of system mutexes might even be limited in some implementations.
I think you could replace most of this patch with a few calls to apr_atomic_inc32().
Bert
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.