X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 13 Mar 2008 10:30:28 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: pthread_mutex_lock/unlock performance? Message-ID: <20080313093028.GA31841@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20080313093207 DOT GB31787 AT msvoboda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080313093207.GB31787@msvoboda> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mar 13 10:32, Mojmir Svoboda wrote: > hello, > > i'm runing cygwin (1.5.25?) under win xp sp2 and i ran a simple test > which was supposed to measure the speed of pthread_mutex_lock, > increment, pthread_mutex_unlock compared to interlocked increment and > windows critical section. > > the thing is that cygwin's pthread_mutex_lock performs quite lazily - it > takes about seven times more than using native critical section. > > i wonder why, of course :) Bookkeeping overhead? Just have a look into the Cygwin source. If you want to speed up Cygwin's pthread implementation, feel free to contribute: http://cygwin.com/contrib.html Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/