kernel_optimize_test/scripts/basic
Alexey Dobriyan dee81e9886 fixdep: faster CONFIG_ search
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: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-08-24 22:34:19 +02:00
..
.gitignore bin2c: move bin2c in scripts/basic 2014-08-08 15:57:32 -07:00
bin2c.c scripts: Fix size mismatch of kexec_purgatory_size 2016-07-22 14:05:40 +02:00
fixdep.c fixdep: faster CONFIG_ search 2016-08-24 22:34:19 +02:00
Makefile kernel: build bin2c based on config option CONFIG_BUILD_BIN2C 2014-08-08 15:57:32 -07:00