<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<A href="http://msdn.microsoft.com/en-us/library/ee418650(VS.85).aspx">http://msdn.microsoft.com/en-us/library/ee418650(VS.85).aspx</A><BR>
<BR>MemoryBarrier was measured as taking 20-90 cycles.<BR>
InterlockedIncrement was measured as taking 36-90 cycles.<BR>
Acquiring or releasing a critical section was measured as taking 40-100 cycles.<BR>
Acquiring or releasing a mutex was measured as taking about 750-2500 cycles<BR>
<BR>
perhaps just use critical sections...<BR>
<BR>
<BR>
(I'm very ambivalent about atomics. It is just so darn difficult to do lockless programming.<BR>
Granted, if you are a systems language, then you need to be able to imlement the locks themselves.<BR>
Perhaps.)<BR><BR>
- Jay<BR> </body>
</html>