Re: TextOut() to a DialogBox ???
On Mar 24, 1:39 pm, "Peter Olcott" <NoS...@OCR4Screen.com> wrote:
Here is an interesting note that I don't understand. A
slight revision (to make it a little less CPU intensive,
thus more memory intensive) only actually achieves 21 MB per
second of the 12 GB / second maximum RAM speed. (RAM speed
reported by MemTest86).
const uint32 size = 100000000;
std::vector<uint32> Data;
uint32 Max = 0x3fffffff;
void Process() {
clock_t finish;
clock_t start = clock();
double duration;
uint32 num;
for (uint32 N = 0; N < Max; N++)
num = Data[num];
finish = clock();
duration = (double)(finish - start) / CLOCKS_PER_SEC;
printf("%4.2f Seconds\n", duration);
}
Another thing that I don't understand is that it crashes
when
num = Data[num];
is replaced by
num = Data[N];
I suppose that this is an example of code you wrote that "mostly works
the
first time with only the most trivial logic errors", as gloatingly
boasted by you in your post over here:
http://groups.google.com/group/microsoft.public.vc.mfc/tree/browse_frm/thre=
ad/c84953c13066a4f3/4b4e98102ea69979?rnum=11&_done=%2Fgroup%2Fmicrosoft=
..public.vc.mfc%2Fbrowse_frm%2Fthread%2Fc84953c13066a4f3%3F#doc_dd77f6384b36=
9bb2
Quote from your post:
"I really can't stand debugging my own code, that is why I
take very extreme measures to prevent bugs from occurring in
the first place. I carefully design every single line of
code, and check the design many times before I even try to
compile it. Most of the code that I write mostly works the
first time with only the most trivial logic errors. "
Really. Such modesty. I can see two errors immediately in only 14
lines of code, for an error rate of 14.3%.
I apologize for the ad hominem attack. Although it's unlike me, I am
compelled by the vast quantities of fine resources (from the likes of
Joe and Hector) that are being wasted on this stuff.