Click here to Skip to main content
15,913,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralI want to know specific memory address is use or free Pin
00000000098-Oct-05 16:21
00000000098-Oct-05 16:21 
AnswerRe: how can know in memory someone addresses in free list Pin
John R. Shaw8-Oct-05 20:55
John R. Shaw8-Oct-05 20:55 
QuestionSlow access to array Pin
rudo328-Oct-05 12:27
rudo328-Oct-05 12:27 
QuestionRe: Slow access to array Pin
Jose Lamas Rios8-Oct-05 14:27
Jose Lamas Rios8-Oct-05 14:27 
AnswerRe: Slow access to array Pin
rudo329-Oct-05 0:21
rudo329-Oct-05 0:21 
AnswerRe: Slow access to array Pin
Rage_bla8-Oct-05 14:30
Rage_bla8-Oct-05 14:30 
GeneralRe: Slow access to array Pin
rudo329-Oct-05 0:24
rudo329-Oct-05 0:24 
GeneralRe: Slow access to array Pin
Rage_bla9-Oct-05 3:58
Rage_bla9-Oct-05 3:58 
int main(int argc, char* argv[])
{
DWORD beg = GetTickCount();

int i,j,k;
for (j=0;j<N;++j)
{
for (i=0;i<N;++i)
{
for (k=0;k<N;++k)
{
M3[1] = M1[1] * M2[1]; // no indexing just 1
}
}
}

DWORD end = GetTickCount();
printf("%d\n", end - beg);


beg = GetTickCount();
int* pjk = &M1[1000];
int* pik = &M2[1000];
int* pkk = &M3[1000];

for (int* pj = &M1[0]; pj < pjk ; ++pj)
{
for (int* pi = &M2[0]; pi < pik ; ++pi)
{
for (int* pk = &M3[0]; pk < pkk ; ++pk)
{
M3[1] = M1[1] * M2[1];
}
}
}

end = GetTickCount();
printf("%d\n", end - beg);
}

The first one takes 1.594s on my system, the second one 1.438s.
That is on A64 3500+, 1GB DDR 400.

What system do you have??

-- modified at 9:58 Sunday 9th October, 2005
GeneralRe: Slow access to array Pin
rudo329-Oct-05 5:41
rudo329-Oct-05 5:41 
GeneralRe: Slow access to array Pin
Rage_bla9-Oct-05 5:54
Rage_bla9-Oct-05 5:54 
AnswerRe: Slow access to array Pin
John R. Shaw8-Oct-05 21:20
John R. Shaw8-Oct-05 21:20 
GeneralRe: Slow access to array Pin
rudo329-Oct-05 0:26
rudo329-Oct-05 0:26 
GeneralRe: Slow access to array Pin
John R. Shaw9-Oct-05 0:54
John R. Shaw9-Oct-05 0:54 
GeneralRe: Slow access to array Pin
rudo329-Oct-05 3:08
rudo329-Oct-05 3:08 
GeneralRe: Slow access to array Pin
John R. Shaw12-Oct-05 11:18
John R. Shaw12-Oct-05 11:18 
QuestionFree C++ .Net compiler questions Pin
Jim Crafton8-Oct-05 9:11
Jim Crafton8-Oct-05 9:11 
AnswerRe: Free C++ .Net compiler questions Pin
John R. Shaw8-Oct-05 23:11
John R. Shaw8-Oct-05 23:11 
GeneralRe: Free C++ .Net compiler questions Pin
Jim Crafton9-Oct-05 4:56
Jim Crafton9-Oct-05 4:56 
QuestionModeless dialog communicating with parent dialog Pin
fjlv20058-Oct-05 9:08
fjlv20058-Oct-05 9:08 
AnswerRe: Modeless dialog communicating with parent dialog Pin
Jose Lamas Rios8-Oct-05 14:32
Jose Lamas Rios8-Oct-05 14:32 
QuestionRe: Modeless dialog communicating with parent dialog Pin
fjlv20059-Oct-05 18:42
fjlv20059-Oct-05 18:42 
QuestionHow in CEdit to install the cursor in anchor point? Pin
pup20028-Oct-05 7:36
pup20028-Oct-05 7:36 
AnswerRe: How in CEdit to install the cursor in anchor point? Pin
Mircea Puiu8-Oct-05 21:03
Mircea Puiu8-Oct-05 21:03 
AnswerRe: How in CEdit to install the cursor in anchor point? Pin
John R. Shaw8-Oct-05 21:39
John R. Shaw8-Oct-05 21:39 
QuestionCButton with Bitmap Transparency Pin
fjlv20058-Oct-05 5:02
fjlv20058-Oct-05 5:02 

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.