4 ms·
I can do change like this: static unsigned int github_idea4good = -1; if(0 < github_idea4good) will never be true. But the result is same. I believe the key
by idea4good 9y ago
I can do change like this:
static unsigned int github_idea4good = -1;
if(0 < github_idea4good) will never be true.
But the result is same.
I believe the key is: github_idea4good must out of cache.
- amscanne 9y agogithub_idea4good is unsigned. There’s an implicit cast at the assignment. The condition is still true and that path is always executed.
- idea4good 9y agogood catch! Change it like this: #define PROBE_TIMES 100000 static int github_idea4good = -1; If probe times big enough, it works still.