Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #9589 > unrolled thread
| Started by | KaiWen <wenkai1987@gmail.com> |
|---|---|
| First post | 2011-09-01 01:41 -0700 |
| Last post | 2011-09-03 15:11 -0700 |
| Articles | 20 on this page of 114 — 22 participants |
Back to article view | Back to comp.lang.c++
Generally, are the programs written by C++ slower than written by C 10% ? KaiWen <wenkai1987@gmail.com> - 2011-09-01 01:41 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Ian Collins <ian-news@hotmail.com> - 2011-09-01 21:15 +1200
Re: Generally, are the programs written by C++ slower than written by C 10% ? "Fred Zwarts \(KVI\)" <F.Zwarts@KVI.nl> - 2011-09-01 11:48 +0200
Re: Generally, are the programs written by C++ slower than written by C 10% ? Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-01 15:34 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? KaiWen <wenkai1987@gmail.com> - 2011-09-01 19:09 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Ian Collins <ian-news@hotmail.com> - 2011-09-02 14:39 +1200
Re: Generally, are the programs written by C++ slower than written by C 10% ? Krice <paulkp@mbnet.fi> - 2011-09-01 22:33 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Paavo Helde <myfirstname@osa.pri.ee> - 2011-09-02 01:12 -0500
Re: Generally, are the programs written by C++ slower than written by C 10% ? James Kanze <james.kanze@gmail.com> - 2011-09-03 15:25 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Paavo Helde <myfirstname@osa.pri.ee> - 2011-09-04 01:34 -0500
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-04 02:33 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? James Kanze <james.kanze@gmail.com> - 2011-09-04 11:00 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Goran <goran.pusic@gmail.com> - 2011-09-01 23:23 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 03:00 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Goran <goran.pusic@gmail.com> - 2011-09-02 09:39 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Rui Maciel <rui.maciel@gmail.com> - 2011-09-02 12:44 +0100
Re: Generally, are the programs written by C++ slower than written by C 10% ? Rui Maciel <rui.maciel@gmail.com> - 2011-09-02 09:59 +0100
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-02 11:25 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Juha Nieminen <nospam@thanks.invalid> - 2011-09-03 05:51 +0000
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-03 01:45 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Ian Collins <ian-news@hotmail.com> - 2011-09-03 20:53 +1200
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-03 10:49 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Ian Collins <ian-news@hotmail.com> - 2011-09-04 08:15 +1200
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-03 17:50 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Juha Nieminen <nospam@thanks.invalid> - 2011-09-03 16:28 +0000
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-03 10:42 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? "Bo Persson" <bop@gmb.dk> - 2011-09-04 11:34 +0200
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-04 09:04 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Juha Nieminen <nospam@thanks.invalid> - 2011-09-04 18:04 +0000
Re: Generally, are the programs written by C++ slower than written by C 10% ? Keith H Duggar <duggar@alum.mit.edu> - 2011-09-04 18:44 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-04 23:26 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Juha Nieminen <nospam@thanks.invalid> - 2011-09-05 08:01 +0000
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-05 11:45 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Juha Nieminen <nospam@thanks.invalid> - 2011-09-06 06:30 +0000
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-06 07:22 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Miles Bader <miles@gnu.org> - 2011-09-06 16:25 +0900
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-06 07:14 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Miles Bader <miles@gnu.org> - 2011-09-07 12:28 +0900
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-07 16:49 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Noah Roberts <roberts.noah@gmail.com> - 2011-09-07 18:45 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-08 15:56 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? James Kanze <james.kanze@gmail.com> - 2011-09-03 15:32 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-03 19:16 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-05 00:28 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-05 12:34 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Ian Collins <ian-news@hotmail.com> - 2011-09-06 07:51 +1200
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-05 14:06 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-06 00:32 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-06 07:33 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-07 02:52 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-08 16:24 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Ian Collins <ian-news@hotmail.com> - 2011-09-09 11:38 +1200
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-08 21:39 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Ian Collins <ian-news@hotmail.com> - 2011-09-09 19:01 +1200
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-09 02:45 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-09 03:23 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-09-14 23:12 +0000
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-09 02:40 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-09 11:19 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Paavo Helde <myfirstname@osa.pri.ee> - 2011-09-09 15:42 -0500
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-09 14:24 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Noah Roberts <roberts.noah@gmail.com> - 2011-09-09 18:22 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-10 10:11 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Noah Roberts <roberts.noah@gmail.com> - 2011-09-10 10:54 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-10 14:28 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Miles Bader <miles@gnu.org> - 2011-09-11 12:29 +0900
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-11 00:45 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-12 00:39 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Miles Bader <miles@gnu.org> - 2011-09-12 18:06 +0900
Re: Generally, are the programs written by C++ slower than written by C 10% ? Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-12 16:46 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Miles Bader <miles@gnu.org> - 2011-09-13 10:20 +0900
Re: Generally, are the programs written by C++ slower than written by C 10% ? Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-13 13:16 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nobody <nobody@nowhere.com> - 2011-09-11 04:53 +0100
Re: Generally, are the programs written by C++ slower than written by C 10% ? Miles Bader <miles@gnu.org> - 2011-09-11 14:51 +0900
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-10 07:46 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? KaiWen <wenkai1987@gmail.com> - 2011-09-06 03:10 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Ian Collins <ian-news@hotmail.com> - 2011-09-06 22:50 +1200
Re: Generally, are the programs written by C++ slower than written by C 10% ? KaiWen <wenkai1987@gmail.com> - 2011-09-06 04:48 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-07 09:45 +0000
Re: Generally, are the programs written by C++ slower than written by C 10% ? Ian Collins <ian-news@hotmail.com> - 2011-09-07 21:51 +1200
Re: Generally, are the programs written by C++ slower than written by C 10% ? KaiWen <wenkai1987@gmail.com> - 2011-09-08 00:15 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-08 12:14 +0000
Re: Generally, are the programs written by C++ slower than written by C 10% ? KaiWen <wenkai1987@gmail.com> - 2011-09-08 07:14 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Asger-P <junk@asger-p.dk> - 2011-09-06 13:52 +0200
Re: Generally, are the programs written by C++ slower than written by C 10% ? Paavo Helde <myfirstname@osa.pri.ee> - 2011-09-06 11:47 -0500
Re: Generally, are the programs written by C++ slower than written by C 10% ? Paavo Helde <myfirstname@osa.pri.ee> - 2011-09-06 11:50 -0500
Re: Generally, are the programs written by C++ slower than written by C 10% ? Asger-P <junk@asger-p.dk> - 2011-09-06 21:04 +0200
Re: Generally, are the programs written by C++ slower than written by C 10% ? Leigh Johnston <leigh@i42.co.uk> - 2011-09-06 20:37 +0100
Re: Generally, are the programs written by C++ slower than written by C 10% ? Paavo Helde <myfirstname@osa.pri.ee> - 2011-09-06 15:10 -0500
Re: Generally, are the programs written by C++ slower than written by C 10% ? Leigh Johnston <leigh@i42.co.uk> - 2011-09-06 21:14 +0100
Re: Generally, are the programs written by C++ slower than written by C 10% ? Asger-P <junk@asger-p.dk> - 2011-09-07 00:40 +0200
Re: Generally, are the programs written by C++ slower than written by C 10% ? Leigh Johnston <leigh@i42.co.uk> - 2011-09-06 23:59 +0100
Re: Generally, are the programs written by C++ slower than written by C 10% ? Noah Roberts <roberts.noah@gmail.com> - 2011-09-06 16:26 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Paavo Helde <myfirstname@osa.pri.ee> - 2011-09-06 14:55 -0500
Re: Generally, are the programs written by C++ slower than written by C 10% ? Asger-P <junk@asger-p.dk> - 2011-09-07 00:51 +0200
Re: Generally, are the programs written by C++ slower than written by C 10% ? Paavo Helde <myfirstname@osa.pri.ee> - 2011-09-06 23:29 -0500
Re: Generally, are the programs written by C++ slower than written by C 10% ? Asger-P <junk@asger-p.dk> - 2011-09-07 09:06 +0200
Re: Generally, are the programs written by C++ slower than written by C 10% ? Ian Collins <ian-news@hotmail.com> - 2011-09-07 19:09 +1200
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nobody <nobody@nowhere.com> - 2011-09-07 13:19 +0100
Re: Generally, are the programs written by C++ slower than written by C 10% ? Juha Nieminen <nospam@thanks.invalid> - 2011-09-07 13:01 +0000
Re: Generally, are the programs written by C++ slower than written by C 10% ? Rui Maciel <rui.maciel@gmail.com> - 2011-09-07 14:26 +0100
Re: Generally, are the programs written by C++ slower than written by C 10% ? Asger-P <junk@asger-p.dk> - 2011-09-07 15:49 +0200
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-08 22:49 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Miles Bader <miles@gnu.org> - 2011-09-09 15:25 +0900
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-09 02:50 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-09 03:26 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-09 03:25 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-06 00:24 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-06 13:57 +0000
Re: Generally, are the programs written by C++ slower than written by C 10% ? BGB <cr88192@hotmail.com> - 2011-09-06 08:18 -0700
Re: Generally, are the programs written by C++ slower than written by C 10% ? Nobody <nobody@nowhere.com> - 2011-09-03 08:34 +0100
Re: Generally, are the programs written by C++ slower than written by C 10% ? "A" <a@a.a> - 2011-09-01 11:50 +0200
Re: Generally, are the programs written by C++ slower than written by C 10% ? Rui Maciel <rui.maciel@gmail.com> - 2011-09-01 10:53 +0100
Re: Generally, are the programs written by C++ slower than written by C 10% ? James Kanze <james.kanze@gmail.com> - 2011-09-03 15:11 -0700
Page 5 of 6 — ← Prev page 1 2 3 4 [5] 6 Next page →
| From | KaiWen <wenkai1987@gmail.com> |
|---|---|
| Date | 2011-09-08 00:15 -0700 |
| Message-ID | <33b4e932-dffa-48b4-a876-cbae4354109a@u10g2000prn.googlegroups.com> |
| In reply to | #9880 |
On 9月7日, 下午5时45分, yatremblay@bel1lin202.(none) (Yannick Tremblay) wrote: > >I test the code in a virtual machine, Fedora 15 witch in the Virtual > >Box. > >756M memory, 2G HZ. > > And what compiler did you use and what compilation options did you > use? gcc version 4.6.0 20110428 (Red Hat 4.6.0-6) (GCC)
[toc] | [prev] | [next] | [standalone]
| From | yatremblay@bel1lin202.(none) (Yannick Tremblay) |
|---|---|
| Date | 2011-09-08 12:14 +0000 |
| Message-ID | <j4abj9$j2e$2@dont-email.me> |
| In reply to | #9918 |
In article <33b4e932-dffa-48b4-a876-cbae4354109a@u10g2000prn.googlegroups.com>, KaiWen <wenkai1987@gmail.com> wrote: >On 9月7日, 下午5时45分, yatremblay@bel1lin202.(none) (Yannick Tremblay) >wrote: >> >I test the code in a virtual machine, Fedora 15 witch in the Virtual >> >Box. >> >756M memory, 2G HZ. >> >> And what compiler did you use and what compilation options did you >> use? > >gcc version 4.6.0 20110428 (Red Hat 4.6.0-6) (GCC) compilation options? These are the key. Huge difference of behaviour between -O0 and -O3.
[toc] | [prev] | [next] | [standalone]
| From | KaiWen <wenkai1987@gmail.com> |
|---|---|
| Date | 2011-09-08 07:14 -0700 |
| Message-ID | <6b3dbddb-cdb5-453d-8b17-ec37d9b4bd75@u7g2000pro.googlegroups.com> |
| In reply to | #9920 |
On 9月8日, 下午8时14分, yatremblay@bel1lin202.(none) (Yannick Tremblay) wrote: > In article <33b4e932-dffa-48b4-a876-cbae43541...@u10g2000prn.googlegroups.com>, > > KaiWen <wenkai1...@gmail.com> wrote: > >On 9月7日, 下午5时45分, yatremblay@bel1lin202.(none) (Yannick Tremblay) > >wrote: > >> >I test the code in a virtual machine, Fedora 15 witch in the Virtual > >> >Box. > >> >756M memory, 2G HZ. > > >> And what compiler did you use and what compilation options did you > >> use? > > >gcc version 4.6.0 20110428 (Red Hat 4.6.0-6) (GCC) > > compilation options? These are the key. Huge difference of behaviour > between -O0 and -O3. Oh, Sorry. -Wall -O2
[toc] | [prev] | [next] | [standalone]
| From | Asger-P <junk@asger-p.dk> |
|---|---|
| Date | 2011-09-06 13:52 +0200 |
| Message-ID | <op.v1dxylxr2juju3@ajwin7> |
| In reply to | #9791 |
Hi Ian On the: 06. of september-2011 At: 12:50 Ian Collins wrote: >> >> output: >> ---------------------------- >> test 1 use 1260000 >> test 2 use 850000 >> test 3 use 610000 >> test 4 use 20000 >> >> So, could I think that if an object is constructed and destructed >> frequently, I should make its member data are POD (not std::string or >> some other expensive thing) ? Like this: > > Why do you think std::string is necessary expensive? When I tried you > code, I got > > test 1 use 650000 > test 2 use 660000 > test 3 use 570000 > test 4 use 0 On windows using CB2009 test 1 use 589 test 2 use 752 test 3 use 526 test 4 use 85 No penalty here for using std::string either, I dont know why my numbers are so much smaller though, mine is in milliseconds, I use a WinAPI function caled timeGetTime() i couldn't find Clock(). Best regards Asger-P
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <myfirstname@osa.pri.ee> |
|---|---|
| Date | 2011-09-06 11:47 -0500 |
| Message-ID | <Xns9F58C9669BC01myfirstnameosapriee@216.196.109.131> |
| In reply to | #9790 |
KaiWen <wenkai1987@gmail.com> wrote in
news:c7c6ebac-3a50-443e-a864-55f25df6ed54@g32g2000pri.googlegroups.com:
>
> #include <iostream>
> #include <string>
> #include <cstring>
#include <clock.h>
>
> int main() {
> clock_t tbeg;
>
> {
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> std::string("hello, world!");
>
> std::cout << "test 1 use " << clock() - tbeg <<
> std::endl;
> }
>
> {
> tbeg = clock();
> for (int i = 0; i < 10000000; i++) {
> char* str = new char[20];
> strcpy(str, "hello, world!");
> delete [] str;
> }
>
> std::cout << "test 2 use " << clock() - tbeg <<
> std::endl;
> }
>
> {
> tbeg = clock();
> for (int i = 0; i < 10000000; i++) {
> char* str = (char*)malloc(20);
> strcpy(str, "hello, world!");
> free(str);
> }
>
> std::cout << "test 3 use " << clock() - tbeg <<
> std::endl;
> }
>
> {
> tbeg = clock();
> for (int i = 0; i < 10000000; i++) {
> char str[20];
> strcpy(str, "hello, world!");
> }
>
> std::cout << "test 4 use " << clock() - tbeg <<
> std::endl;
> }
>
> return 0;
> }
>
> output:
> ----------------------------
> test 1 use 1260000
> test 2 use 850000
> test 3 use 610000
> test 4 use 20000
My results (MSVC2010, Release x64 build):
test 1 use 160
test 2 use 476
test 3 use 417
test 4 use 0
The absolute values are not interesting as the clock() tick length is
platform-specific. However, std::string is much faster here than
malloc/new. I guess the small string optimization kicked in so
std::string did not perform any dynamic memory allocation at all.
Test 4 probably got optimized away completely.
cheers
Paavo
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <myfirstname@osa.pri.ee> |
|---|---|
| Date | 2011-09-06 11:50 -0500 |
| Message-ID | <Xns9F58C9EB47774myfirstnameosapriee@216.196.109.131> |
| In reply to | #9811 |
Paavo Helde <myfirstname@osa.pri.ee> wrote in news:Xns9F58C9669BC01myfirstnameosapriee@216.196.109.131: > KaiWen <wenkai1987@gmail.com> wrote in > news:c7c6ebac-3a50-443e-a864-55f25df6ed54@g32g2000pri.googlegroups.com: >> >> #include <iostream> >> #include <string> >> #include <cstring> > > #include <clock.h> Sorry, I meant <time.h> of course.
[toc] | [prev] | [next] | [standalone]
| From | Asger-P <junk@asger-p.dk> |
|---|---|
| Date | 2011-09-06 21:04 +0200 |
| Message-ID | <op.v1ehx8bs2juju3@ajwin7> |
| In reply to | #9811 |
Hi Paavo
Modified the test a little to make sure the std::string
actually was created, it makes quite a difference:
#include <iostream>
#include <string>
#include <cstring>
#include <time.h>
#include <stdlib.h>
#include <conio.h>
int _tmain(int argc, char* argv[])
{
clock_t tbeg;
char *cStr = "123456789012345678901234567890";
const int L = strlen( cStr ) + 1;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
std::string test(cStr);
if( test[5] == '0' )
std::cout << "error" << std::endl;
}
std::cout << "test 1 use " << clock() - tbeg << std::endl;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
char* str = new char[L];
strcpy(str, cStr);
if( str[5] == '0' )
std::cout << "error" << std::endl;
delete [] str;
}
std::cout << "test 2 use " << clock() - tbeg << std::endl;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
char* str = (char*)malloc(L);
strcpy(str, cStr);
if( str[5] == '0' )
std::cout << "error" << std::endl;
free(str);
}
std::cout << "test 3 use " << clock() - tbeg << std::endl;
getch();
return 0;
}
test 1 use 1451
test 2 use 998
test 3 use 749
why is malloc faster then new ??
Best regards
Asger-P
[toc] | [prev] | [next] | [standalone]
| From | Leigh Johnston <leigh@i42.co.uk> |
|---|---|
| Date | 2011-09-06 20:37 +0100 |
| Message-ID | <jqWdnbaAb5AE6_vTnZ2dnUVZ8gidnZ2d@giganews.com> |
| In reply to | #9818 |
On 06/09/2011 20:04, Asger-P wrote:
>
> Hi Paavo
>
> Modified the test a little to make sure the std::string
> actually was created, it makes quite a difference:
>
> #include <iostream>
> #include <string>
> #include <cstring>
> #include <time.h>
> #include <stdlib.h>
> #include <conio.h>
>
> int _tmain(int argc, char* argv[])
> {
> clock_t tbeg;
> char *cStr = "123456789012345678901234567890";
> const int L = strlen( cStr ) + 1;
>
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> std::string test(cStr);
> if( test[5] == '0' )
> std::cout << "error" << std::endl;
> }
>
> std::cout << "test 1 use " << clock() - tbeg << std::endl;
>
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> char* str = new char[L];
> strcpy(str, cStr);
> if( str[5] == '0' )
> std::cout << "error" << std::endl;
> delete [] str;
> }
>
> std::cout << "test 2 use " << clock() - tbeg << std::endl;
>
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> char* str = (char*)malloc(L);
> strcpy(str, cStr);
> if( str[5] == '0' )
> std::cout << "error" << std::endl;
> free(str);
> }
>
> std::cout << "test 3 use " << clock() - tbeg << std::endl;
>
>
> getch();
> return 0;
> }
>
> test 1 use 1451
> test 2 use 998
> test 3 use 749
>
> why is malloc faster then new ??
>
> Best regards
> Asger-P
Lets change the conditions of the test slightly:
int main(int argc, char* argv[])
{
clock_t tbeg;
char *cStr =
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
const int L = strlen( cStr ) + 1;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
std::string test(cStr, L);
std::string test2 = test;
test2 += test;
if( test2[5] == '0' )
std::cout << "error" << std::endl;
}
std::cout << "test 1 use " << clock() - tbeg << std::endl;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
char* str = new char[L];
strcpy(str, cStr);
char* str2 = new char[L*2];
strcpy(str2, str);
strcat(str2, str);
if( str2[5] == '0' )
std::cout << "error" << std::endl;
delete [] str;
delete [] str2;
}
std::cout << "test 2 use " << clock() - tbeg << std::endl;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
char* str = (char*)malloc(L);
strcpy(str, cStr);
char* str2 = (char*)malloc(L*2);
strcpy(str2, str);
strcat(str2, str);
if( str2[5] == '0' )
std::cout << "error" << std::endl;
free(str);
free(str2);
}
std::cout << "test 3 use " << clock() - tbeg << std::endl;
getch();
return 0;
}
We get:
test 1 use 5460
test 2 use 7472
test 3 use 7410
Swings and roundabouts. Also if we use a very short string:
char *cStr = "12345";
We get:
test 1 use 1232
test 2 use 1654
test 3 use 1544
Again it is just swings and roundabouts. Even if on average std::string
performs slightly worse than C style strings the convenience that
std::string offers more than makes up for its performance shortcomings IMO.
/Leigh
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <myfirstname@osa.pri.ee> |
|---|---|
| Date | 2011-09-06 15:10 -0500 |
| Message-ID | <Xns9F58EBC0BE4C7myfirstnameosapriee@216.196.109.131> |
| In reply to | #9822 |
Leigh Johnston <leigh@i42.co.uk> wrote in
news:jqWdnbaAb5AE6_vTnZ2dnUVZ8gidnZ2d@giganews.com:
> char *cStr =
> "1234567890123456789012345678901234567890123456789012345678901234567890
> 12345678901234567890123456789012345678901234567890"
>
> "1234567890123456789012345678901234567890123456789012345678901234567890
> 12345678901234567890123456789012345678901234567890";
> const int L = strlen( cStr ) + 1;
> std::string test(cStr, L);
Should be
std::string test(cStr, L-1);
And yes, passing L here makes the tests more fair, as malloc/new got the
size L, but std::string did not in the original version.
[toc] | [prev] | [next] | [standalone]
| From | Leigh Johnston <leigh@i42.co.uk> |
|---|---|
| Date | 2011-09-06 21:14 +0100 |
| Message-ID | <WPydneiT2pu94vvTnZ2dnUVZ8sCdnZ2d@giganews.com> |
| In reply to | #9825 |
On 06/09/2011 21:10, Paavo Helde wrote: > Leigh Johnston<leigh@i42.co.uk> wrote in > news:jqWdnbaAb5AE6_vTnZ2dnUVZ8gidnZ2d@giganews.com: > >> char *cStr = >> "1234567890123456789012345678901234567890123456789012345678901234567890 >> 12345678901234567890123456789012345678901234567890" >> >> "1234567890123456789012345678901234567890123456789012345678901234567890 >> 12345678901234567890123456789012345678901234567890"; >> const int L = strlen( cStr ) + 1; > >> std::string test(cStr, L); > > Should be > > std::string test(cStr, L-1); > > And yes, passing L here makes the tests more fair, as malloc/new got the > size L, but std::string did not in the original version. > Yes a n00bish mistake on my part; L-1 is correct and also fair (as most std::string implementations will allocate +1 to aid c_str()). /Leigh
[toc] | [prev] | [next] | [standalone]
| From | Asger-P <junk@asger-p.dk> |
|---|---|
| Date | 2011-09-07 00:40 +0200 |
| Message-ID | <op.v1erxzl52juju3@ajwin7> |
| In reply to | #9825 |
Hi Paavo Helde
On the: 06. of september-2011 At: 22:10 Paavo Helde wrote:
> std::string test(cStr, L-1);
>
> And yes, passing L here makes the tests more fair, as malloc/new got the
> size L, but std::string did not in the original version.
That is right, but then the std::string knows the length all
the way arround, so I think it would e fair to give the same
advantage to char array, like this.
int main(int argc, char* argv[])
{
clock_t tbeg;
char *cStr =
"123456789012345678901234567890123456789012345678901234567890";
const int L = strlen( cStr );
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
std::string test(cStr, L);
std::string test2 = test;
test2 += test;
if( test2[5] == '0' )
std::cout << "error" << std::endl;
}
std::cout << "test 1 use " << clock() - tbeg << std::endl;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
char* str = new char[L+1];
strncpy(str, cStr, L);
char* str2 = new char[L*2 + 2];
strncpy(str2, str, L);
strncpy(&str2[L], str, L);
if( str2[5] == '0' )
std::cout << "error" << std::endl;
delete [] str;
delete [] str2;
}
std::cout << "test 2 use " << clock() - tbeg << std::endl;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
char* str = (char*)malloc(L+1);
strncpy(str, cStr, L);
char* str2 = (char*)malloc(L*2 + 2);
strncpy(str2, str, L);
strncpy(&str2[L], str, L);
if( str2[5] == '0' )
std::cout << "error" << std::endl;
free(str);
free(str2);
}
std::cout << "test 3 use " << clock() - tbeg << std::endl;
getch();
return 0;
}
and then the numbers are really in favor of char array,
not the amount of coding though.
test 1 use 3744
test 2 use 2090
test 3 use 1623
Best regards
Asger-P
[toc] | [prev] | [next] | [standalone]
| From | Leigh Johnston <leigh@i42.co.uk> |
|---|---|
| Date | 2011-09-06 23:59 +0100 |
| Message-ID | <JbudndCEZOZlOPvTnZ2dnUVZ8rGdnZ2d@giganews.com> |
| In reply to | #9841 |
On 06/09/2011 23:40, Asger-P wrote:
>
> Hi Paavo Helde
>
> On the: 06. of september-2011 At: 22:10 Paavo Helde wrote:
>
>> std::string test(cStr, L-1);
>>
>> And yes, passing L here makes the tests more fair, as malloc/new got the
>> size L, but std::string did not in the original version.
>
> That is right, but then the std::string knows the length all
> the way arround, so I think it would e fair to give the same
> advantage to char array, like this.
>
> int main(int argc, char* argv[])
> {
> clock_t tbeg;
> char *cStr =
> "123456789012345678901234567890123456789012345678901234567890";
> const int L = strlen( cStr );
>
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> std::string test(cStr, L);
> std::string test2 = test;
> test2 += test;
> if( test2[5] == '0' )
> std::cout << "error" << std::endl;
> }
>
> std::cout << "test 1 use " << clock() - tbeg << std::endl;
>
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> char* str = new char[L+1];
> strncpy(str, cStr, L);
> char* str2 = new char[L*2 + 2];
> strncpy(str2, str, L);
> strncpy(&str2[L], str, L);
> if( str2[5] == '0' )
> std::cout << "error" << std::endl;
> delete [] str;
> delete [] str2;
> }
>
> std::cout << "test 2 use " << clock() - tbeg << std::endl;
>
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> char* str = (char*)malloc(L+1);
> strncpy(str, cStr, L);
> char* str2 = (char*)malloc(L*2 + 2);
> strncpy(str2, str, L);
> strncpy(&str2[L], str, L);
> if( str2[5] == '0' )
> std::cout << "error" << std::endl;
> free(str);
> free(str2);
> }
>
> std::cout << "test 3 use " << clock() - tbeg << std::endl;
>
>
> getch();
> return 0;
> }
>
> and then the numbers are really in favor of char array,
> not the amount of coding though.
>
> test 1 use 3744
> test 2 use 2090
> test 3 use 1623
>
> Best regards
> Asger-P
I actually meant to remove that L argument to std::string ctor to keep
it fair; so for:
int main(int argc, char* argv[])
{
clock_t tbeg;
char *cStr =
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
const int L = strlen( cStr ) + 1;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
std::string test(cStr);
std::string test2 = test;
test2 += test;
if( test2[5] == '0' )
std::cout << "error" << std::endl;
}
std::cout << "test 1 use " << clock() - tbeg << std::endl;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
char* str = new char[L];
strcpy(str, cStr);
char* str2 = new char[L*2];
strcpy(str2, str);
strcat(str2, str);
if( str2[5] == '0' )
std::cout << "error" << std::endl;
delete [] str;
delete [] str2;
}
std::cout << "test 2 use " << clock() - tbeg << std::endl;
tbeg = clock();
for (int i = 0; i < 10000000; i++)
{
char* str = (char*)malloc(L);
strcpy(str, cStr);
char* str2 = (char*)malloc(L*2);
strcpy(str2, str);
strcat(str2, str);
if( str2[5] == '0' )
std::cout << "error" << std::endl;
free(str);
free(str2);
}
std::cout << "test 3 use " << clock() - tbeg << std::endl;
getch();
return 0;
}
We get:
test 1 use 6140
test 2 use 7490
test 3 use 7380
So again I can show a test case in which std::string beats C style
strings but this toing and froing will get us nowhere. Bottom line:
prefer std::vector and std::string over dynamic arrays and C style
strings and avoid premature optimization.
/Leigh
[toc] | [prev] | [next] | [standalone]
| From | Noah Roberts <roberts.noah@gmail.com> |
|---|---|
| Date | 2011-09-06 16:26 -0700 |
| Message-ID | <108fba26-798d-4614-a6fc-1be5c27d17da@e9g2000yqb.googlegroups.com> |
| In reply to | #9841 |
On Sep 6, 3:40 pm, Asger-P <j...@asger-p.dk> wrote:
> Hi Paavo Helde
>
> On the: 06. of september-2011 At: 22:10 Paavo Helde wrote:
>
> > std::string test(cStr, L-1);
>
> > And yes, passing L here makes the tests more fair, as malloc/new got the
> > size L, but std::string did not in the original version.
>
> That is right, but then the std::string knows the length all
> the way arround, so I think it would e fair to give the same
> advantage to char array, like this.
>
> int main(int argc, char* argv[])
> {
> clock_t tbeg;
> char *cStr =
> "123456789012345678901234567890123456789012345678901234567890";
> const int L = strlen( cStr );
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> //std::string test(cStr, L);
> //std::string test2 = test;
> //test2 += test;
std::string test = cStr;
std::string test2;
test2.reserve(L*2);
test2.append(test).append(test);
> if( test2[5] == '0' )
> std::cout << "error" << std::endl;
> }
>
> std::cout << "test 1 use " << clock() - tbeg << std::endl;
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> char* str = new char[L+1];
> strncpy(str, cStr, L);
> char* str2 = new char[L*2 + 2];
> strncpy(str2, str, L);
> strncpy(&str2[L], str, L);
> if( str2[5] == '0' )
> std::cout << "error" << std::endl;
> delete [] str;
> delete [] str2;
> }
>
> std::cout << "test 2 use " << clock() - tbeg << std::endl;
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> char* str = (char*)malloc(L+1);
> strncpy(str, cStr, L);
> char* str2 = (char*)malloc(L*2 + 2);
> strncpy(str2, str, L);
> strncpy(&str2[L], str, L);
> if( str2[5] == '0' )
> std::cout << "error" << std::endl;
> free(str);
> free(str2);
> }
>
> std::cout << "test 3 use " << clock() - tbeg << std::endl;
>
> getch();
> return 0;
>
> }
>
> and then the numbers are really in favor of char array,
> not the amount of coding though.
>
> test 1 use 3744
Fixed it for you.
> test 2 use 2090
> test 3 use 1623
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <myfirstname@osa.pri.ee> |
|---|---|
| Date | 2011-09-06 14:55 -0500 |
| Message-ID | <Xns9F58E9284800Amyfirstnameosapriee@216.196.109.131> |
| In reply to | #9818 |
Asger-P <junk@asger-p.dk> wrote in news:op.v1ehx8bs2juju3@ajwin7:
>
> Hi Paavo
>
> Modified the test a little to make sure the std::string
> actually was created, it makes quite a difference:
std:strings were all created before as well, no problem with that.
>
> #include <iostream>
> #include <string>
> #include <cstring>
> #include <time.h>
> #include <stdlib.h>
> #include <conio.h>
Not a standard header
>
> int _tmain(int argc, char* argv[])
Not a standard signature
> {
> clock_t tbeg;
> char *cStr = "123456789012345678901234567890";
> const int L = strlen( cStr ) + 1;
>
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> std::string test(cStr);
> if( test[5] == '0' )
> std::cout << "error" << std::endl;
> }
>
> std::cout << "test 1 use " << clock() - tbeg << std::endl;
>
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> char* str = new char[L];
> strcpy(str, cStr);
> if( str[5] == '0' )
> std::cout << "error" << std::endl;
> delete [] str;
> }
>
> std::cout << "test 2 use " << clock() - tbeg << std::endl;
>
>
> tbeg = clock();
> for (int i = 0; i < 10000000; i++)
> {
> char* str = (char*)malloc(L);
> strcpy(str, cStr);
> if( str[5] == '0' )
> std::cout << "error" << std::endl;
> free(str);
> }
>
> std::cout << "test 3 use " << clock() - tbeg << std::endl;
>
>
> getch();
Not a standard function
> return 0;
> }
>
> test 1 use 1451
> test 2 use 998
> test 3 use 749
I get:
test 1 use 688
test 2 use 620
test 3 use 586
Are you sure you are using an optimized build?
> why is malloc faster then new ??
new typically forwards to malloc behind the scenes, so it is a
malloc+something extra (at least one function call more). As this test
code does not do much more (strcpy() gets inlined by my compiler), I
guess an extra function call starts to show up.
std::string seems to be slower because std::string::assign() (called by
the inlined constructor) and the destructor call were not inlined by my
compiler. This probably means 2 non-inlined function calls more than the
"new" version.
In a real app, memory transfer and cache misses would probably kick in
when processing 10000000 strings; as the main memory access is nowadays
very slow compared to CPU, these cache misses would probably dominate the
overall speed and things like data locality would start to play. In other
words, this simple performance comparison is not very useful for
practical purposes, except of showing that the performance of all these
approaches is comparable.
Cheers
Paavo
[toc] | [prev] | [next] | [standalone]
| From | Asger-P <junk@asger-p.dk> |
|---|---|
| Date | 2011-09-07 00:51 +0200 |
| Message-ID | <op.v1esgogg2juju3@ajwin7> |
| In reply to | #9823 |
Hi Paavo On the: 06. of september-2011 At: 21:55 Paavo Helde wrote: >> #include <conio.h> > > Not a standard header >> >> int _tmain(int argc, char* argv[]) > > Not a standard signature ...snip... >> getch(); > > Not a standard function It's just me never doing any commandline apps. ;-) Do You really care about that :O >> test 1 use 1451 >> test 2 use 998 >> test 3 use 749 > > I get: > test 1 use 688 > test 2 use 620 > test 3 use 586 > > Are you sure you are using an optimized build? Yes, I do a release build in my CB2009, so that is odd, but then again I usually use the VCL UnicodeString, I never tested the std::string before, so I might need to do some other tweaking. >> why is malloc faster then new ?? > > new typically forwards to malloc behind the scenes, so it is a > malloc+something extra (at least one function call more). As this test > code does not do much more (strcpy() gets inlined by my compiler), I ....snip.... > practical purposes, except of showing that the performance of all these > approaches is comparable. Thanks You very much for explaining. Best regards Asger-P
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <myfirstname@osa.pri.ee> |
|---|---|
| Date | 2011-09-06 23:29 -0500 |
| Message-ID | <Xns9F594C3A282B6myfirstnameosapriee@216.196.109.131> |
| In reply to | #9843 |
Asger-P <junk@asger-p.dk> wrote in news:op.v1esgogg2juju3@ajwin7: > > Hi Paavo > > On the: 06. of september-2011 At: 21:55 Paavo Helde wrote: > >>> #include <conio.h> >> >> Not a standard header >>> >>> int _tmain(int argc, char* argv[]) >> >> Not a standard signature > ...snip... >>> getch(); >> >> Not a standard function > > It's just me never doing any commandline apps. ;-) > Do You really care about that :O It means other people can not just copy-paste your code and compile-run it by themselves. > Yes, I do a release build in my CB2009, so that is odd, From your timings it seems that maybe CB2009 is not so good when optimizing std::string. I did a little googling and the first relevant page popping up claimed: "C++ Builder 2010 Optimizing C++ Compiler I'm pleasantly surprised after giving C++ Builder 2010 a quick spin. It's much better at optimizing code than its predecessor CB2007 (I skipped CB2009 altogether as it was and still is completely broken)." (http://blog.zachsaw.com/2010/01/c-builder-2010-optimizing-c- compiler.html) Cheers Paavo
[toc] | [prev] | [next] | [standalone]
| From | Asger-P <junk@asger-p.dk> |
|---|---|
| Date | 2011-09-07 09:06 +0200 |
| Message-ID | <op.v1ffcyn12juju3@ajwin7> |
| In reply to | #9861 |
Hi Paavo On the: 07. of september-2011 At: 06:29 Paavo Helde wrote: >>>> getch(); >>> >>> Not a standard function >> >> It's just me never doing any commandline apps. ;-) >> Do You really care about that :O > > It means other people can not just copy-paste your code and compile-run > it by themselves. Well then I better ask how You get the console window to stay open long enough to read the result, when doing a build and run.? if You dont use something like getch(); Best regards Asger-P
[toc] | [prev] | [next] | [standalone]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Date | 2011-09-07 19:09 +1200 |
| Subject | Re: Generally, are the programs written by C++ slower than written by C 10% ? |
| Message-ID | <9cojlrF72aU12@mid.individual.net> |
| In reply to | #9868 |
On 09/ 7/11 07:06 PM, Asger-P wrote: > > Hi Paavo > > On the: 07. of september-2011 At: 06:29 Paavo Helde wrote: > > >>>>> getch(); >>>> >>>> Not a standard function >>> >>> It's just me never doing any commandline apps. ;-) >>> Do You really care about that :O >> >> It means other people can not just copy-paste your code and compile-run >> it by themselves. > > Well then I better ask how You get the console window to stay open > long enough to read the result, when doing a build and run.? > if You dont use something like getch(); Don't use windows! -- Ian Collins
[toc] | [prev] | [next] | [standalone]
| From | Nobody <nobody@nowhere.com> |
|---|---|
| Date | 2011-09-07 13:19 +0100 |
| Message-ID | <pan.2011.09.07.12.19.02.497000@nowhere.com> |
| In reply to | #9868 |
On Wed, 07 Sep 2011 09:06:24 +0200, Asger-P wrote: >>>>> getch(); >>>> >>>> Not a standard function > Well then I better ask how You get the console window to stay open > long enough to read the result, when doing a build and run.? > if You dont use something like getch(); Use something standard like cin.get();
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2011-09-07 13:01 +0000 |
| Message-ID | <4e676b3a$0$4376$7b1e8fa0@news.nbl.fi> |
| In reply to | #9896 |
Nobody <nobody@nowhere.com> wrote: > On Wed, 07 Sep 2011 09:06:24 +0200, Asger-P wrote: > >>>>>> getch(); >>>>> >>>>> Not a standard function > >> Well then I better ask how You get the console window to stay open >> long enough to read the result, when doing a build and run.? >> if You dont use something like getch(); > > Use something standard like cin.get(); Visual Studio can be configured so that the command prompt window will not close when the program terminates.
[toc] | [prev] | [next] | [standalone]
Page 5 of 6 — ← Prev page 1 2 3 4 [5] 6 Next page →
Back to top | Article view | comp.lang.c++
csiph-web