Click here to Skip to main content
15,907,395 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MDI without FileNew message at startup Pin
David Crow1-Jun-09 9:35
David Crow1-Jun-09 9:35 
Questionhelp Pin
ramina sen1-Jun-09 8:33
ramina sen1-Jun-09 8:33 
QuestionRe: help Pin
David Crow1-Jun-09 9:35
David Crow1-Jun-09 9:35 
AnswerRe: help Pin
Michael Schubert1-Jun-09 22:00
Michael Schubert1-Jun-09 22:00 
QuestionCView::OnFilePrintPreview Pin
Software20071-Jun-09 7:35
Software20071-Jun-09 7:35 
QuestionAdd a scrollbar when I StrechtBlt() an image? Pin
Episodio11-Jun-09 6:44
Episodio11-Jun-09 6:44 
QuestionAfter response WM_DRAWITEM message , how to make a function that it is similar to CMemu::SetMenuItemBitmaps [modified] Pin
bdwzz1-Jun-09 5:53
bdwzz1-Jun-09 5:53 
Questionthreading differences VC6 v VS2005 Pin
Chris Losinger1-Jun-09 4:29
professionalChris Losinger1-Jun-09 4:29 
i have a bit of C++ code that does some pretty heavy-duty image processing work. sadly, the code wasn't running as fast as i'd hoped, so, after doing all the optimizations i could think of, i decided to try multi-threading it.

i broke the job into strips, with each thread taking a horizontal strip of the image. the algorithm is the same, and 99% of the code is the same; the only difference is some bounds-checking code that the multi-threaded version skips. there is no communication between threads.

the multi-threaded version was more than twice as slow as the single-threaded version - i kept the single-threaded version of the code intact, for benchmarking.

i wrote it using VC6 (because I prefer the IDE to the VS.Net IDEs). so, i opened the project in VS05, built and ran it - hoping the VS05 compiler had some better optimization. but no, the single-threaded version ran exactly as fast as it did when built with VC6.

on the other hand, in VS05, the multi-threaded version ran twice as fast as the single-threaded version. again: the multi-threaded code went from twice as slow to twice as fast, simply by changing the compiler, but the single-threaded version didn't change at all.

these projects are all built with the multi-threaded CLR, same optimizations (controlled by pragmas in the code). the single and multi-threaded function live in the same module (same class, in fact).

so, something changed between VC6 and VS05 which affects how fast threads run.
does anybody know what that change was ?


AnswerRe: threading differences VC6 v VS2005 Pin
Luc Pattyn1-Jun-09 4:52
sitebuilderLuc Pattyn1-Jun-09 4:52 
GeneralRe: threading differences VC6 v VS2005 Pin
Chris Losinger1-Jun-09 5:10
professionalChris Losinger1-Jun-09 5:10 
GeneralRe: threading differences VC6 v VS2005 Pin
Luc Pattyn1-Jun-09 5:49
sitebuilderLuc Pattyn1-Jun-09 5:49 
GeneralRe: threading differences VC6 v VS2005 Pin
Chris Losinger1-Jun-09 6:15
professionalChris Losinger1-Jun-09 6:15 
GeneralRe: threading differences VC6 v VS2005 Pin
Randor 1-Jun-09 7:14
professional Randor 1-Jun-09 7:14 
GeneralRe: threading differences VC6 v VS2005 Pin
ZelionThunder2-Jun-09 17:43
ZelionThunder2-Jun-09 17:43 
GeneralRe: threading differences VC6 v VS2005 Pin
Luc Pattyn1-Jun-09 6:03
sitebuilderLuc Pattyn1-Jun-09 6:03 
GeneralRe: threading differences VC6 v VS2005 Pin
Chris Losinger1-Jun-09 6:16
professionalChris Losinger1-Jun-09 6:16 
AnswerRe: threading differences VC6 v VS2005 Pin
Joe Woodbury1-Jun-09 7:50
professionalJoe Woodbury1-Jun-09 7:50 
GeneralRe: threading differences VC6 v VS2005 Pin
Chris Losinger1-Jun-09 7:53
professionalChris Losinger1-Jun-09 7:53 
QuestionGadjet integration with IE toolbar? Pin
ritz12341-Jun-09 4:16
ritz12341-Jun-09 4:16 
QuestionIn Window forms application C++ Pin
wael_r1-Jun-09 3:33
wael_r1-Jun-09 3:33 
AnswerRe: In Window forms application C++ Pin
David Crow1-Jun-09 3:45
David Crow1-Jun-09 3:45 
AnswerRe: In Window forms application C++ Pin
fanronghua1-Jun-09 19:25
fanronghua1-Jun-09 19:25 
QuestionTyping in Unicode language Pin
Benjamin Bruno1-Jun-09 3:32
Benjamin Bruno1-Jun-09 3:32 
QuestionSNMP development Pin
Jim Crafton1-Jun-09 3:25
Jim Crafton1-Jun-09 3:25 
AnswerRe: SNMP development Pin
Joe Woodbury1-Jun-09 8:19
professionalJoe Woodbury1-Jun-09 8:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.