找回密码
 注册
查看: 779|回复: 5

定义LDFLAGS,优化gentoo

[复制链接]
发表于 2004-11-15 12:52:38 | 显示全部楼层 |阅读模式
Are we missing some easy optimizations (LDFLAGS)?   

--------------------------------------------------------------------------------

I know how much everyone here loves optimized software. This is why I was surprised to read today on the GNOME mailing list that Ubuntu is taking advantage of some optimization opportunities that I think Gentoo is missing out on.

See these two posts:
http://mail.gnome.org/archives/desktop-devel-list/2004-September/msg00377.html
http://mail.gnome.org/archives/desktop-devel-list/2004-September/msg00381.html

The LDFLAG in question is -O1, which according to Ulrich Drepper's paper, "How to Write Shared Libraries" is an optimization that should decrease application start times. You can try this out for yourself by having a line in /etc/make.conf that reads:
Code:
LDFLAGS="-Wl,-O1"



Feel free to share your results with this, as I'm curious to know if it has any positive or negative effects. Anyone more familiar with ld and LDFLAGS know if this would actually be useful? I assume others would be interested in doing this for Gentoo.

See my bug report here:
http://bugs.gentoo.org/show_bug.cgi?id=65002

[edit] This post from last year might be interesting:
LDFLAGS Central
http://forums.gentoo.org/viewtopic.php?t=67777&highlight=ldflags

How come this idea seemed to fizzle out? Does it really have that little effect? I don't know how many people here have tried Ubuntu yet, but I was impressed with the speed, especially considering it's a binary distribution. I know I found myself curious as to how they made their binary distribution so snappy...

See lower in the thread for some information on how this works from Ulrich Drepper's report.






http://forums.gentoo.org/viewtopic.php?t=226909&highlight=ldflag
 楼主| 发表于 2004-11-15 21:20:12 | 显示全部楼层
简而言之
/etc/make.conf里添加
[code:1]LDFLAGS="-Wl,-O1"[/code:1]
有助性能提升

是Wl(小写字母l)不是W1(数字1)
回复

使用道具 举报

 楼主| 发表于 2004-11-17 23:08:59 | 显示全部楼层
用-Wl -O3升级了KDE,好像快了一些
回复

使用道具 举报

发表于 2004-11-18 21:42:42 | 显示全部楼层
对于Xfce如何,我打开了透明与阴影后,cpu占用率很高啊
回复

使用道具 举报

 楼主| 发表于 2004-11-18 21:49:49 | 显示全部楼层
[quote:f04128e1ba="linky_fan"]对于Xfce如何,我打开了透明与阴影后,cpu占用率很高啊[/quote]
xorg理的两个扩展和nvidia的加速添加了吗?
回复

使用道具 举报

发表于 2004-11-23 12:33:56 | 显示全部楼层
添加了,可能是俺这台自己不行: C3 1.3 + 384SDRAM+gf2 mx400,有空看一下我另一台机子的表现 (P4 2.6c + 1G DDR400 + GF fx5900u)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-13 19:01 , Processed in 0.029028 second(s), 16 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表