红联Linux门户
Linux帮助

让你的FreeBSD系统达到最优化

发布时间:2007-02-21 10:41:50来源:红联作者:fitness
一个最重要的答案就是:运行针对你cpu型号编译的程序!
#CFLAGS= -O -pipe
#CXXFLAGS+= -fmemoize-lookups -fsave-memoized
怎么改?就改CFLAGS与CXXFLAGS参数!首先把前面的“#”号去掉,然后再参照下面的表:
引用:
CFLAGS= -march=i386 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=i386 -O3 -pipe -fomit-frame-pointer
i486 (Intel):
CFLAGS= -march=i486 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=i486 -O3 -pipe -fomit-frame-pointer
Pentium 1 (Intel)
CFLAGS= -march=pentium -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=pentium -O3 -pipe -fomit-frame-pointer
Pentium MMX (Intel)
CFLAGS= -march=pentium-mmx -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=pentium-mmx -O3 -pipe -fomit-frame-pointer
Pentium PRO (Intel)
CFLAGS= -march=pentiumpro -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=pentiumpro -O3 -pipe -fomit-frame-pointer
Pentium II (Intel)
CFLAGS= -march=pentium2 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=pentium2 -O3 -pipe -fomit-frame-pointer
Celeron (Mendocino), aka Celeron1 (Intel)
CFLAGS= -march=pentium2 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=pentium2 -O3 -pipe -fomit-frame-pointer
Pentium III (Intel)
CFLAGS= -march=pentium3 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=pentium3 -O3 -pipe -fomit-frame-pointer
Celeron (Coppermine) aka Celeron2 (Intel)
CFLAGS= -march=pentium3 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=pentium3 -O3 -pipe -fomit-frame-pointer
Celeron (Willamette?) (Intel)
CFLAGS= -march=pentium4 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=pentium4 -O3 -pipe -fomit-frame-pointer
Pentium 4 (Intel)
CFLAGS= -march=pentium4 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=pentium4 -O3 -pipe -fomit-frame-pointer
Eden C3/Ezra (Via)
CFLAGS= -march=i586 -m3dnow -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=i586 -m3dnow -O3 -pipe -fomit-frame-pointer
K6 (AMD)
CFLAGS= -march=k6 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=k6 -O3 -pipe -fomit-frame-pointer
K6-2 (AMD)
CFLAGS= -march=k6-2 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=k6-2 -O3 -pipe -fomit-frame-pointer
K6-3 (AMD)
CFLAGS= -march=k6-3 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=k6-3 -O3 -pipe -fomit-frame-pointer
Athlon (AMD)
CFLAGS= -march=athlon -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=athlon -O3 -pipe -fomit-frame-pointer
Athlon-tbird, aka K7 (AMD)
CFLAGS= -march=athlon-tbird -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=athlon-tbird -O3 -pipe -fomit-frame-pointer
Athlon-tbird XP (AMD)
CFLAGS= -march=athlon-xp -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=athlon-xp -O3 -pipe -fomit-frame-pointer
Athlon 4(AMD)
CFLAGS= -march=athlon-4 -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=athlon-4 -O3 -pipe -fomit-frame-pointer
Athlon XP (AMD)
CFLAGS= -march=athlon-xp -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=athlon-xp -O3 -pipe -fomit-frame-pointer
Athlon MP (AMD)
CFLAGS= -march=athlon-mp -O3 -pipe -fomit-frame-pointer
CXXFLAGS+= -march=athlon-mp -O3 -pipe -fomit-frame-pointer

根据你cpu的型号选择。好了,就这样。
文章评论

共有 0 条评论