Is it magic or what ??

Posted by STRIDER on Stack Overflow See other posts from Stack Overflow or by STRIDER
Published on 2010-04-15T15:39:23Z Indexed on 2010/04/15 15:43 UTC
Read the original article Hit count: 302

Filed under:
|

I am writing a big C code...
The code includes recursive bactracking function named Branch() that is called so much...
My goal is to write the fastest code to get the best running time...

I also have another function Redundant()

void Redundant()
{
 int* A;
 A=(int*)malloc(100*sizeof(int));
}

I created two versions.
Version A: Redundant() is included in Branch().
Version B: Redundant() is not included in Branch()

A run 10 times faster than B !!!!

Is is Magic or is it kind of process scheduling or what ??

© Stack Overflow or respective owner

Related posts about c

    Related posts about c++