stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Teleman <stefan.tele...@gmail.com>
Subject Re: STDCXX-1056 [was: Re: STDCXX forks]
Date Thu, 06 Sep 2012 02:20:35 GMT
On Wed, Sep 5, 2012 at 4:20 PM, Stefan Teleman <stefan.teleman@gmail.com> wrote:

> But then there's another aspect  -- which I probably failed to
> highlight in my previous email: the per-object mutex implementation is
> 20% *slower* than the class-static mutex implementation.
>
> class-static implementation:
> real 2139.31
> user 2406.09
> sys 155.61
>
> pe-object implementation:
> real 2416.75
> user 2694.64
> sys 159.49

The above results are for the Intel compiler. Now here are the results
with GCC 4.7.0:

1. with the static per-class mutex:

# INFO (S1) (10 lines):
# TEXT:
# COMPILER: gcc 4.7.0, __VERSION__ = "4.7.0 20120507 (Red Hat 4.7.0-5)"
# ENVIRONMENT: pentiumpro running linux-elf (Fedora release 17 (Beefy
Miracle) (3.5.0-2.fc17.x86_64)) with glibc 2.15
# FILE: 22.locale.numpunct.mt.cpp
# COMPILED: Sep  5 2012, 06:21:18
# COMMENT: thread safety
############################################################

[ ... ]

# +-----------------------+----------+----------+----------+
# | DIAGNOSTIC            |  ACTIVE  |   TOTAL  | INACTIVE |
# +-----------------------+----------+----------+----------+
# | (S1) INFO             |       11 |       11 |       0% |
# | (S2) NOTE             |        1 |        1 |       0% |
# | (S8) ERROR            |        0 |        3 |     100% |
# | (S9) FATAL            |        0 |        1 |     100% |
# +-----------------------+----------+----------+----------+
real 2165.06
user 2428.08
sys 151.30


2. With the per-object mutex:

# INFO (S1) (10 lines):
# TEXT:
# COMPILER: gcc 4.7.0, __VERSION__ = "4.7.0 20120507 (Red Hat 4.7.0-5)"
# ENVIRONMENT: pentiumpro running linux-elf (Fedora release 17 (Beefy
Miracle) (3.5.0-2.fc17.x86_64)) with glibc 2.15
# FILE: 22.locale.numpunct.mt.cpp
# COMPILED: Sep  5 2012, 21:29:56
# COMMENT: thread safety
############################################################

# CLAUSE: lib.locale.numpunct

 [ ... ]

# +-----------------------+----------+----------+----------+
# | DIAGNOSTIC            |  ACTIVE  |   TOTAL  | INACTIVE |
# +-----------------------+----------+----------+----------+
# | (S1) INFO             |       11 |       11 |       0% |
# | (S2) NOTE             |        1 |        1 |       0% |
# | (S8) ERROR            |        0 |        3 |     100% |
# | (S9) FATAL            |        0 |        1 |     100% |
# +-----------------------+----------+----------+----------+
real 2438.70
user 2726.44
sys 155.79

About the same percentage difference as the Intel compiler.

--Stefan

---
Stefan Teleman
KDE e.V.
stefan.teleman@gmail.com

Mime
View raw message