incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mark.g.brown" <mark.g.br...@gmail.com>
Subject simple iostream benchmark
Date Tue, 15 May 2007 04:32:20 GMT
Hi,

I wrote the attached simple benchmark program to compare iostreams
and C stdio. Running it with -10000000 and 10000000 on the command
line on Linux 2.6.9 (GNU libc 2.5) I get the numbers below for each
of the implementations I tried when using /dev/null and /tmp/file
as the sink:

                  /dev/null      /tmp/file
                 CLK:USR:SYS    CLK:USR:SYS

stdio           28s:27s:0.0s   32s:28s:1.8s
g++ 4.1.1       42s:42s:0.0s   44s:42s:2.0s
stdcxx trunk    40s:41s:0.0s   49s:41s:5.8s
STLport 5.1.3   27s:27s:0.0s   30s:27s:2.3s

The CLK, USR, and SYS abbreviations stand for wall clock, user time,
and system time. In all cases I used -D_REENTRANT, -O2 and -pthread
to compile and link.

-- Mark

Mime
View raw message