Re: Is gcc thread-unsafe?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Arjan van de Ven <arjan@...>
Cc: <davids@...>, Linux-Kernel@Vger. Kernel. Org <linux-kernel@...>
Date: Thursday, October 25, 2007 - 7:27 pm

Arjan van de Ven wrote:

It is a win if the branch cannot be effectively predicted, i.e. if the 
outcome is essentially random, as may occur with data-dependent 
conditionals. I've seen a doubling of performance on one workload using 
a predicated instruction instead of a branch on newer Xeons in such a case.

I suspect that if branch prediction fails often, the data dependency 
created by the cmov, etc. is less expensive than the pipeline flush 
required by mispredicts..

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Is gcc thread-unsafe?, Robert Hancock, (Thu Oct 25, 7:27 pm)