hi, i have the following piece of code in a program compiled using both VC8
and VC6. it basically just writes out two arrays to cout.
the VC6 program takes about 4 seconds to go through that bit of code whereas
the VC8 program takes almost 18 seconds !
can someone tell me why this is so ? is this common?
thanks,
Julian.
(numberOfEquations= 15711)
int ic;
ic=0;
for(int j=0; j<numberOfEquations; j++)
{ic +=1;
cout<<loadVector[j]<<FORMAT;
if(ic==10) { ic=0; cout<<endl;}
}cout<<endl;
cout<<"pseudoLoadVector"<<endl;
ic=0;
for( j=0; j<numberOfEquations; j++)
{ic +=1;
cout<<pseudoLoadVector[j]<<FORMAT;
if(ic==10) { ic=0; cout<<endl;}
}cout<<endl; 8 1211
hi, i have the following piece of code in a program compiled using both
VC8 and VC6. it basically just writes out two arrays to cout.
the VC6 program takes about 4 seconds to go through that bit of code
whereas the VC8 program takes almost 18 seconds !
can someone tell me why this is so ? is this common?
thanks,
Julian.
(numberOfEquations= 15711)
int ic;
ic=0;
for(int j=0; j<numberOfEquations; j++)
{ic +=1;
cout<<loadVector[j]<<FORMAT;
if(ic==10) { ic=0; cout<<endl;}
}cout<<endl;
cout<<"pseudoLoadVector"<<endl;
ic=0;
for( j=0; j<numberOfEquations; j++)
{ic +=1;
cout<<pseudoLoadVector[j]<<FORMAT;
if(ic==10) { ic=0; cout<<endl;}
}cout<<endl;
Maybe an obvious question, but were both release builds?
--
Kind regards,
Bruno van Dooren br**********************@hotmail.com
Remove only "_nos_pam"
Julian wrote:
hi, i have the following piece of code in a program compiled using both VC8
and VC6. it basically just writes out two arrays to cout.
the VC6 program takes about 4 seconds to go through that bit of code whereas
the VC8 program takes almost 18 seconds !
can someone tell me why this is so ? is this common?
thanks,
Julian.
(numberOfEquations= 15711)
int ic;
ic=0;
for(int j=0; j<numberOfEquations; j++)
{ic +=1;
cout<<loadVector[j]<<FORMAT;
if(ic==10) { ic=0; cout<<endl;}
}cout<<endl;
cout<<"pseudoLoadVector"<<endl;
ic=0;
for( j=0; j<numberOfEquations; j++)
{ic +=1;
cout<<pseudoLoadVector[j]<<FORMAT;
if(ic==10) { ic=0; cout<<endl;}
}cout<<endl;
Maybe this is a problem with the speed of console. Did you take those
readings on the same computer ?
My Windows computer at work for some reason is terribly slow writing to
the console (in Windows). It's a Pentium 4 2.6G HT but you can almost
see the console refreshing from top to bottom when scrolling.
Hi Julian!
hi, i have the following piece of code in a program compiled using both VC8
and VC6. it basically just writes out two arrays to cout.
the VC6 program takes about 4 seconds to go through that bit of code whereas
the VC8 program takes almost 18 seconds !
Is the VC6 also using the multi-threaded CRT?
Also there is a small performance hit in VC8; which will be seen in
"non-real-world" test cases as your example...
See: http://www.codeproject.com/cpp/improved2005crt.asp
--
Greetings
Jochen
My blog about Win32 and .NET http://blog.kalmbachnet.de/
Hi Jochen,
A nice article, thanks. Just a small note:
You probably meant x64 there. IA-64 is Itanuim.
Intel calls it's AMD64 compatible processors "Intel 64" - as they say,
to avoid confusion...
Regards,
-PA
"Jochen Kalmbach [MVP]" wrote:
Hi Julian!
hi, i have the following piece of code in a program compiled using both VC8
and VC6. it basically just writes out two arrays to cout.
the VC6 program takes about 4 seconds to go through that bit of code whereas
the VC8 program takes almost 18 seconds !
Is the VC6 also using the multi-threaded CRT?
Also there is a small performance hit in VC8; which will be seen in
"non-real-world" test cases as your example...
See: http://www.codeproject.com/cpp/improved2005crt.asp
--
Greetings
Jochen
My blog about Win32 and .NET http://blog.kalmbachnet.de/
Hi Pavel!
A nice article, thanks. Just a small note:
You probably meant x64 there. IA-64 is Itanuim.
Intel calls it's AMD64 compatible processors "Intel 64" - as they say,
to avoid confusion...
I don't understand what is confusing you...
The "bug" is present in x86 and IA64 implementation of the CRT.
It is *not* present in x64!
By the way: The problem is solved in SP1!
--
Greetings
Jochen
My blog about Win32 and .NET http://blog.kalmbachnet.de/
"Bruno van Dooren [MVP VC++]" <br**********************@hotmail.comwrote
in message news:OZ**************@TK2MSFTNGP02.phx.gbl...
>hi, i have the following piece of code in a program compiled using both VC8 and VC6. it basically just writes out two arrays to cout. the VC6 program takes about 4 seconds to go through that bit of code whereas the VC8 program takes almost 18 seconds ! can someone tell me why this is so ? is this common?
thanks, Julian.
(numberOfEquations= 15711)
int ic; ic=0; for(int j=0; j<numberOfEquations; j++) {ic +=1; cout<<loadVector[j]<<FORMAT; if(ic==10) { ic=0; cout<<endl;} }cout<<endl; cout<<"pseudoLoadVector"<<endl; ic=0; for( j=0; j<numberOfEquations; j++) {ic +=1; cout<<pseudoLoadVector[j]<<FORMAT; if(ic==10) { ic=0; cout<<endl;} }cout<<endl;
Maybe an obvious question, but were both release builds?
--
Kind regards,
Bruno van Dooren br**********************@hotmail.com
Remove only "_nos_pam"
yeah, i compared the two release builds against each other and the two debug
builds against each other.. same behavior. (on the same computer)
"Roman Ziak" <ne****@ziak.comwrote in message
news:H6*******************@read1.cgocable.net...
Julian wrote:
>hi, i have the following piece of code in a program compiled using both VC8 and VC6. it basically just writes out two arrays to cout. the VC6 program takes about 4 seconds to go through that bit of code whereas the VC8 program takes almost 18 seconds ! can someone tell me why this is so ? is this common?
thanks, Julian.
(numberOfEquations= 15711)
int ic; ic=0; for(int j=0; j<numberOfEquations; j++) {ic +=1; cout<<loadVector[j]<<FORMAT; if(ic==10) { ic=0; cout<<endl;} }cout<<endl; cout<<"pseudoLoadVector"<<endl; ic=0; for( j=0; j<numberOfEquations; j++) {ic +=1; cout<<pseudoLoadVector[j]<<FORMAT; if(ic==10) { ic=0; cout<<endl;} }cout<<endl;
Maybe this is a problem with the speed of console. Did you take those
readings on the same computer ?
My Windows computer at work for some reason is terribly slow writing to
the console (in Windows). It's a Pentium 4 2.6G HT but you can almost
see the console refreshing from top to bottom when scrolling.
yes, readings were from the same computer.
its a P4 2Ghz, 1GB RAM
"Jochen Kalmbach [MVP]" <no********************@holzma.dewrote in message
news:Oc**************@TK2MSFTNGP02.phx.gbl...
Hi Julian!
>hi, i have the following piece of code in a program compiled using both VC8 and VC6. it basically just writes out two arrays to cout. the VC6 program takes about 4 seconds to go through that bit of code whereas the VC8 program takes almost 18 seconds !
Is the VC6 also using the multi-threaded CRT?
Also there is a small performance hit in VC8; which will be seen in
"non-real-world" test cases as your example...
See: http://www.codeproject.com/cpp/improved2005crt.asp
earlier, the VC6 version was single-threaded.
After reading your post, I rebuilt the VC6 version as Multi-threaded DLL
(which is what the VC8 version is) but I still get the same performance
issue. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Minti |
last post by:
Is std::cout slower than printf
When we call printf e.g. in
printf(20 format conversion specifications, 20 arguments);
Is it faster than the
std::cout << { 20 redirections to the output...
|
by: Mark |
last post by:
I am using gnu g++ version 3.3.2,
trying a simple test to read in and then
write out a large (100,000 line) text file
##########################################
CSTDIO VERSION TO READ/WRITE...
|
by: vgame64 |
last post by:
Hi, I have been struggling with writing a program for a few hours. The
requirements are that: """You will be writing a program which will
determine whether a date is valid in
terms of days in that...
|
by: asif929 |
last post by:
I am trying to write a program which creates four triangles. The
program begins with prompting a user " Enter the size of triangles",
number from 1 to N is the size of four triangles For Example if...
|
by: Ground21 |
last post by:
Hello. I'm new // sorry for my english :)
I have to write simple program i c++.
But I don't know how to code src - program should know it's name
(unit1.exe so the name is "unit1" or "unit1.exe"...
|
by: xtheendx |
last post by:
I am writing a gradbook type program. It first allows the user to enter the number of students they want to enter. then allows them to enter the first name, last name, and grade of each student. The...
|
by: Frank Birbacher |
last post by:
Hi!
sphenxes@gmail.com schrieb:
Why is the referenceNumber a string?
Are there always *exactly* six alternatives? The alternatives could be a
std::deque which can resize as needed.
|
by: jerry |
last post by:
i have written a simple phonebook program,i'll show you some of the
codes,the program's head file is member.h . i suppose the head file
works well.so i don't post it. here's the clips of main...
|
by: culture |
last post by:
My code is pasted at the bottom
I am writing a program that gives a user four (4 options)
1) Reorder Sentence
2) Sentence Encryption
3) Count Vowels
4) Quit
My problem is that I have...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |