[complement-svn] SF.net SVN: complement: [1326] trunk/explore/perf/STL
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2006-10-16 18:03:39
|
Revision: 1326 http://svn.sourceforge.net/complement/?rev=1326&view=rev Author: complement Date: 2006-10-16 11:03:19 -0700 (Mon, 16 Oct 2006) Log Message: ----------- really add strings proxy object test to MT Modified Paths: -------------- trunk/explore/perf/STL/string-MT/Makefile trunk/explore/perf/STL/string-MT/add-proxy/str.cc trunk/explore/perf/STL/string-MT/test.sh trunk/explore/perf/STL/strings.gplot Modified: trunk/explore/perf/STL/string-MT/Makefile =================================================================== --- trunk/explore/perf/STL/string-MT/Makefile 2006-10-16 17:32:41 UTC (rev 1325) +++ trunk/explore/perf/STL/string-MT/Makefile 2006-10-16 18:03:19 UTC (rev 1326) @@ -1,6 +1,6 @@ -# -*- Makefile -*- Time-stamp: <05/12/27 00:48:42 ptr> +# -*- Makefile -*- Time-stamp: <06/10/16 21:49:49 ptr> -DIRS = add add-ropes find find-ropes ops ops-ropes params params-ropes params-ref params-ref-ropes params-short +DIRS = add add-ropes find find-ropes ops ops-ropes params params-ropes params-ref params-ref-ropes params-short add-proxy all: for d in $(DIRS); do \ Modified: trunk/explore/perf/STL/string-MT/add-proxy/str.cc =================================================================== --- trunk/explore/perf/STL/string-MT/add-proxy/str.cc 2006-10-16 17:32:41 UTC (rev 1325) +++ trunk/explore/perf/STL/string-MT/add-proxy/str.cc 2006-10-16 18:03:19 UTC (rev 1326) @@ -1,10 +1,11 @@ -// -*- C++ -*- Time-stamp: <03/04/04 23:07:39 ptr> +// -*- C++ -*- Time-stamp: <06/10/16 21:48:50 ptr> #include <string> +#include <pthread.h> using namespace std; -int main( int, char * const * ) +void *f( void * ) { string s; string s1 = "1234567"; @@ -12,9 +13,25 @@ string s3 = ".ext"; string s4 = " /* my comment about this */"; - for ( int i = 0; i < 100000000; ++i ) { + for ( int i = 0; i < 5000000; ++i ) { s = s1 + "/" + s2 + s3 + " => " + s4; } return 0; } + +int main( int, char * const * ) +{ + const int nth = 2; + pthread_t t[nth]; + + for ( int i = 0; i < nth; ++i ) { + pthread_create( &t[i], 0, f, 0 ); + } + + for ( int i = 0; i < nth; ++i ) { + pthread_join( t[i], 0 ); + } + + return 0; +} Modified: trunk/explore/perf/STL/string-MT/test.sh =================================================================== --- trunk/explore/perf/STL/string-MT/test.sh 2006-10-16 17:32:41 UTC (rev 1325) +++ trunk/explore/perf/STL/string-MT/test.sh 2006-10-16 18:03:19 UTC (rev 1326) @@ -1,6 +1,6 @@ #!/bin/sh # -# Time-stamp: <04/07/15 01:16:23 ptr> +# Time-stamp: <06/10/16 21:52:27 ptr> # BASEDIR=${PWD}/../../.. @@ -31,6 +31,12 @@ done # dummy: echo $j `../stat.awk s.log` >> libstd++.dat +let j=j+1 +runtest add-proxy/libstdc++ +echo $j `../stat.awk s.log` >> libstd++.dat +# and dummy again: +let j=j+1 +echo $j `../stat.awk s.log` >> libstd++.dat rm -f STLport.dat touch STLport.dat @@ -43,6 +49,12 @@ done runtest params-short/STLport-no-short-str echo $j `../stat.awk s.log` >> STLport.dat +let j=j+1 +runtest add-proxy/STLport-default +echo $j `../stat.awk s.log` >> STLport.dat +let j=j+1 +runtest add-proxy/STLport-add-str-proxy +echo $j `../stat.awk s.log` >> STLport.dat rm -f STLport-malloc.dat touch STLport-malloc.dat Modified: trunk/explore/perf/STL/strings.gplot =================================================================== --- trunk/explore/perf/STL/strings.gplot 2006-10-16 17:32:41 UTC (rev 1325) +++ trunk/explore/perf/STL/strings.gplot 2006-10-16 18:03:19 UTC (rev 1326) @@ -55,9 +55,20 @@ #pause(-1) +set output "alloc-2.2.5.eps" + +plot [0.9:9.1] 'string/STLport-2.2.5.dat' using ($1):($6) notitle w l lt 1, \ + 'string/STLport-2.2.5.dat' using ($1):($6):($7) title "node alloc" w yerrorbars lt 1, \ + 'string/STLport-newalloc-2.2.5.dat' using ($1):($6) notitle w l lt 2, \ + 'string/STLport-newalloc-2.2.5.dat' using ($1):($6):($7) title "new alloc" w yerrorbars lt 2, \ + 'string/STLport-malloc-2.2.5.dat' using ($1):($6) notitle w l lt 3, \ + 'string/STLport-malloc-2.2.5.dat' using ($1):($6):($7) title "malloc" w yerrorbars lt 3 + +#pause(-1) + set output "strings-MT.eps" -plot [0.9:7.1][0:250] 'string-MT/STLport.dat' using ($1):($6) notitle w l lt 1, \ +plot [0.9:9.1][0:250] 'string-MT/STLport.dat' using ($1):($6) notitle w l lt 1, \ 'string-MT/STLport.dat' using ($1):($6):($7) title "node alloc" w yerrorbars lt 1, \ 'string-MT/libstd++.dat' using ($1):($6) notitle w l lt 2, \ 'string-MT/libstd++.dat' using ($1):($6):($7) title "libstd++" w yerrorbars lt 2, \ @@ -70,7 +81,7 @@ set output "strings-MT2.eps" -plot [0.9:7.1][0:50] 'string-MT/STLport.dat' using ($1):($6) notitle w l lt 1, \ +plot [0.9:9.1][0:50] 'string-MT/STLport.dat' using ($1):($6) notitle w l lt 1, \ 'string-MT/STLport.dat' using ($1):($6):($7) title "node alloc" w yerrorbars lt 1, \ 'string-MT/libstd++.dat' using ($1):($6) notitle w l lt 2, \ 'string-MT/libstd++.dat' using ($1):($6):($7) title "libstd++" w yerrorbars lt 2, \ @@ -83,7 +94,7 @@ set output "strings-MT-t-stlp-n.eps" -plot [0.9:7.1] 'string-MT/STLport.dat' using ($1):($6) notitle w l lt 1, \ +plot [0.9:9.1] 'string-MT/STLport.dat' using ($1):($6) notitle w l lt 1, \ 'string-MT/STLport.dat' using ($1):($6):($7) title "node alloc" w yerrorbars lt 1, \ 'string-MT/STLport.dat' using ($1):($2/2) notitle w l lt 2, \ 'string-MT/STLport.dat' using ($1):($2/2):($3) title "node alloc, user time per thread" w yerrorbars lt 2, \ @@ -93,7 +104,7 @@ #pause(-1) set output "strings-MT-t-libstd.eps" -plot [0.9:7.1] 'string-MT/libstd++.dat' using ($1):($6) notitle w l lt 1, \ +plot [0.9:9.1] 'string-MT/libstd++.dat' using ($1):($6) notitle w l lt 1, \ 'string-MT/libstd++.dat' using ($1):($6):($7) title "libstd++" w yerrorbars lt 1, \ 'string-MT/libstd++.dat' using ($1):($2/2) notitle w l lt 2, \ 'string-MT/libstd++.dat' using ($1):($2/2):($3) title "libstd++, user time per thread" w yerrorbars lt 2, \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |