• Alexey Dobriyan's avatar
    fixdep: faster CONFIG_ search · dee81e98
    Alexey Dobriyan authored
    Do you think kernel build is 100% dominated by gcc? You are wrong!
    One small utility called "fixdep" consistently manages to sneak into
    profile's first page (unless you have small monitor of course).
    
    The choke point is this clever code:
    
    	for (; m < end; m++) {
    		if (*m == INT_CONF) { p = (char *) m  ; goto conf; }
    		if (*m == INT_ONFI) { p = (char *) m-1; goto conf; }
    		if (*m == INT_NFIG) { p = (char *) m-2; goto conf; }
    		if (*m == INT_FIG_) { p = (char *) m-3; goto conf; }
    
    4 branches per 4 characters is not fast.
    
    Use strstr(3), so that SSE2 etc can be used.
    
    With this patch, fixdep is so deep at the bottom, it is hard to find it.
    Signed-off-by: 's avatarAlexey Dobriyan <adobriyan@gmail.com>
    Signed-off-by: 's avatarMichal Marek <mmarek@suse.com>
    dee81e98
Name
Last commit
Last update
..
.gitignore Loading commit data...
Makefile Loading commit data...
bin2c.c Loading commit data...
fixdep.c Loading commit data...