<Summary> Simple C/C++ Perfometer: Splitting string into vector of vectors (Versions 1.x)

27 views
Skip to first unread message

Alex Vinokur

unread,
Apr 20, 2005, 12:13:34 PM4/20/05
to C++ Perfometer Google Group
###############
### Summary ###
###############

=========================================
* Performance
* Comparative Performance Measurement
-----------------------------------------
* Tool : Simple C/C++ Perfometer
* Algorithm: Splitting string into vector of vectors
* Language : C++
* Version : S2VV-1.0
-----------------------------------------
* Environment : Windows 2000 Professional
Intel(R) Celeron(R) CPU 1.70 GHz
Cygwin, Mingw32 interface, Djgpp
* Compilers : GNU g++ 3.x, Microsoft C++ 13.00.9466 (Unmanaged)
* Optimization : No optimization
=========================================



Testing "Splitting string into vector of vectors"
with using Simple C/C++ Perfometer.
---------------------------
* http://groups-beta.google.com/group/perfo/msg/f3c775cf7e3cdcf0
* http://article.gmane.org/gmane.comp.lang.c++.perfometer/118
* http://permalink.gmane.org/gmane.comp.lang.c++.perfometer/118
* http://comments.gmane.org/gmane.comp.lang.c++.perfometer/118
* http://cache.gmane.org/gmane/comp/lang/c++/perfometer/118
---------------------------


String size = 1000
=== String-A: 1000 lines, 0 fields
=== String-B: 1 line, 0 fields
=== String-C: 33 lines, 213 fields
=== String-D: 9 lines, 32 fields




Cygwin, GNU g++ 3.3.3
Number of repetitions : 25
CLOCKS_PER_SEC : 1000
===================================================================================
| Testsuite | Units for String case |
|-----------------------------------------------------|---------------------------|
| Code : Name | A : B : C : D |
|-----------------------------------------------------|---------------------------|
| Unix-C-01 : Function strsep() | 2083 : 614 : 784 : 137 |
| CPP-01 : std::getline, std::istream_iterator | 4737 : 263 : 1832 : 1315 |
| CPP-02 : istream::getline, std::istream_iterator | 4443 : 16 : 1652 : 1071 |
| CPP-03 : for-loop, string::find_first_of | 2243 : 764 : 821 : 150 |
===================================================================================




Mingw, GNU g++ 3.3.3
Number of repetitions : 25
CLOCKS_PER_SEC : 1000
===================================================================================
| Testsuite | Units for String case |
|-----------------------------------------------------|---------------------------|
| Code : Name | A : B : C : D |
|-----------------------------------------------------|---------------------------|
| CPP-01 : std::getline, std::istream_iterator | 471 : 20 : 127 : 63 |
| CPP-02 : istream::getline, std::istream_iterator | 427 : 6 : 103 : 43 |
| CPP-03 : for-loop, string::find_first_of | 234 : 73 : 63 : 6 |
===================================================================================




Djgpp, GNU gpp 3.4.1
Number of repetitions : 300
CLOCKS_PER_SEC : 91
===================================================================================
| Testsuite | Units for String case |
|-----------------------------------------------------|---------------------------|
| Code : Name | A : B : C : D |
|-----------------------------------------------------|---------------------------|
| Unix-C-01 : Function strsep() | 183 : 33 : 68 : 10 |
| CPP-01 : std::getline, std::istream_iterator | 250 : 5 : 78 : 10 |
| CPP-02 : istream::getline, std::istream_iterator | 241 : 0 : 76 : 13 |
| CPP-03 : for-loop, string::find_first_of | 178 : 31 : 73 : 11 |
===================================================================================




Microsoft C++ 13.00.9466 (Unmanaged)
Number of repetitions : 25
CLOCKS_PER_SEC : 1000
===================================================================================
| Testsuite | Units for String case |
|-----------------------------------------------------|---------------------------|
| Code : Name | A : B : C : D |
|-----------------------------------------------------|---------------------------|
| CPP-01 : std::getline, std::istream_iterator | 437 : 36 : 186 : 60 |
| CPP-02 : istream::getline, std::istream_iterator | 443 : 20 : 150 : 50 |
| CPP-03 : for-loop, string::find_first_of | 250 : 147 : 127 : 26 |
===================================================================================


--
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn




Reply all
Reply to author
Forward
0 new messages