|
-
Dec 13th, 2003, 10:03 AM
#1
Thread Starter
Frenzied Member
C++ speed is not consistant and C# is. Why?
This is actually, in my opinion, a very weird happening. I have a c++ program that stretches an image in the entire window and then draws that same image at normal size whereever the mouse moves.
It works great and fast if I have another large program open like VS. But if I just have dev and the program running the drawing is slower than C# is.
But C# remains the same.
Is there something that .net does that my little c++ app does not that could cause that wierdness?
-
Dec 13th, 2003, 10:30 AM
#2
This is really weird. Mind sending me the two apps? Along with whatever test method you use, if it's not recognizable by the human eye.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 13th, 2003, 10:53 AM
#3
This is just a theory...
If VS is open already, then could C# be running fast because the runtimes are already loaded and optimised for the best spot in memory? But VS is a heavy bit of software, could that be slowing down a C++ app?
Just what occurs to me of the top of my head.
I don't live here any more.
-
Dec 13th, 2003, 11:02 AM
#4
Thread Starter
Frenzied Member
Thanks CornedBee. It is actually the same two app I was working on for that Drawing speed test.
Here is the link: CLICK
I know that it will be a pain downloading from there in the 3 chunks of the file I have split up. So, if you want I can send them to your e-mail. Pm me for that.
It is VS for C# not C++ and when it is open, or when alot of other program instances are running the C++ app actually speed up. It does not slow down unless it is one of the few apps running. Seems backwards to me too.
I tested this on 2 different comps. It may or may not keep the pattern I said above all the time though. It is inconsistant.
-
Dec 15th, 2003, 04:46 AM
#5
Noticed it too. This is absurd. Just absurd.
Oh, and the unoptimized, DrawImage version of the C# app was faster for me than the BitBlt...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 15th, 2003, 06:03 PM
#6
Thread Starter
Frenzied Member
That is a good thing to know; that drawImage is faster. I'd like to use it in C++ but I'm not sure if I can with dev.
-
Dec 17th, 2003, 06:31 AM
#7
Junior Member
Just a guess but are you running a dual-processor system?
The app would be running on the same thread as all other apps if you had few open, but if you had lots it might be forced to have hte thread processed by your secondary processor, which at the time might not have as much load as the primary...
-
Dec 17th, 2003, 10:44 AM
#8
I at least are not.
Even if I were, the behavior you described would speak of very poor OS management of the CPUs.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 18th, 2003, 09:43 AM
#9
Thread Starter
Frenzied Member
I am not running dues processors on either computer either.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|