stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <tvi...@quovadx.com>
Subject RE: [PATCH] Use __rw_atomic_xxx() on Windows
Date Thu, 06 Sep 2007 18:02:47 GMT

Doh! I should know better. Here is the results from a 12d build on the
same hardware.

  normal              patched
  ------  1 threads   ------  1 threads
  ms            934   ms           1015
  ms/op  0.00005567   ms/op  0.00006050
  ------  2 threads   ------  2 threads
  ms           6049   ms           6266
  ms/op  0.00036055   ms/op  0.00037348
  ------  4 threads   ------  4 threads
  ms          11948   ms          11813
  ms/op  0.00071216   ms/op  0.00070411
  ------  8 threads   ------  8 threads
  ms          23855   ms          24743
  ms/op  0.00142187   ms/op  0.00147480 



Martin Sebor wrote:
>
>8d is not thread-safe so the atomic function templates should
>be implemented in terms of ordinary increments and decrements
>(if they aren't it's a bug). They should only expand to the
>atomic assembly (or the Win32 Interlocked) functions in 12X
>and 15X build types.
>
>Martin
>

Mime
View raw message