Created
February 18, 2011 20:03
-
-
Save sinya8282/834304 to your computer and use it in GitHub Desktop.
why latter is fast ? (reject called from main loop continuously)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void | |
reject(UCHARP beg, UCHARP buf, UCHARP end, ENVP env){ | |
if (buf >= end) { | |
if (env->print_count) { | |
if (env->filename) { | |
printf("%s:", env->filename); | |
} | |
printf("%d\n", env->count); | |
} | |
return; | |
} | |
beg = buf; | |
return s0(beg, buf, end, env); | |
} | |
/* remove if-statement ver. */ | |
void | |
reject(UCHARP beg, UCHARP buf, UCHARP end, ENVP env){ | |
if (buf >= end) { | |
return; | |
} | |
beg = buf; | |
return s0(beg, buf, end, env); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment