Skip to content

Commit

Permalink
Expose "Optimize for size" option for everybody
Browse files Browse the repository at this point in the history
Let's put my money where my mouth is.  Smaller code is almost always
faster, if only because a single I$ miss ends up leaving a lot of cycles
to make up for.  And system software - kernels in particular - are known
for taking more cache misses than most other kinds.

On my random config, this made the kernel about 10% smaller, and lmbench
seems to say that it's pretty uniformly faster too. Your milage may vary.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Linus Torvalds committed Dec 13, 2005
1 parent 83bab9a commit 0910b44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ config EPOLL
support for epoll family of system calls.

config CC_OPTIMIZE_FOR_SIZE
bool "Optimize for size" if EMBEDDED
bool "Optimize for size"
default y if ARM || H8300
help
Enabling this option will pass "-Os" instead of "-O2" to gcc
Expand Down

0 comments on commit 0910b44

Please sign in to comment.