免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2545 | 回复: 6
打印 上一主题 下一主题

[FreeBSD] [转]Clang'ed FreeBSD: Builds Quicker, Uses Way Less RAM [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-09-06 10:16 |只看该作者 |倒序浏览
原文出处:  http://www.phoronix.com/scan.php?page=news_item&px=MTE3NjI

  1. Clang'ed FreeBSD: Builds Quicker, Uses Way Less RAM
  2. Posted by Michael Larabel on September 05, 2012
  3. A FreeBSD developer has carried out a series of performance tests to explore the impact that LLVM/Clang as the default FreeBSD compiler has on FreeBSD 10 in its current form. The Clang compiler performance was compared to GCC 4.2.1 and GCC 4.7.1. Clang mostly comes out ahead of GCC on FreeBSD.

  4. With the yet-to-be-released FreeBSD 10, Clang is the default compiler with GCC being deprecated from this popular BSD operating system. The simple conclusion from Dimitry Andric that did the compiler testing on FreeBSD 10.0-CURRENT is that Clang compiles mostly faster than GCC (sometimes by a wide margin) and that Clang uses "significantly less" memory during the compilation process.

  5. This testing was looking at the compilation speed as opposed to the speed of the result binaries, which is where Phoronix compiler benchmarks are mostly focused on.

  6. Below are the key remarks from Dimitry's FreeBSD 10 amd64 compiler testing between GCC and LLVM/Clang.

  7.     Summary:
  8.     --------
  9.     For building this specific large C++ program, gcc 4.2.1 is ~86% slower than clang 3.1 in real time, ~82% slower in user time, and ~176% slower in system time. The maximum resident set size during building is ~217% larger, and it causes ~279% more page reclaims.

  10.     Though gcc 4.7.1 is faster than its older version, it is still ~68% slower than clang 3.1 in real time, ~64% slower in user time, and ~161% slower in system time. The maximum resident set size during building is ~220% larger, and it causes ~208% more page reclaims.

  11.     Finally, clang 3.2 is ~3% slower than clang 3.1 in both real time and user time, and ~2% slower in system time. The maximum resident set size and the number of page reclaims during building are approximately equal.

  12.     Conclusion:
  13.     -----------
  14.     Clang 3.1 is clearly the fastest compiler for building this specific large C++ program, with clang 3.2 trailing closely behind. Both are significantly faster, and use much less memory than either version of gcc.

  15. So the Clang C/C++ compiler is doing very good in the FreeBSD world for building packages faster while using less memory. The only negative news towards Clang from these results is that the currently-in-development LLVM 3.2 is slightly slower than LLVM 3.1, but hopefully the build-time performance regressions can be worked out prior to the official 3.2 release and isn't becoming a trend of Clang slowing down as more functionality is introduced into the Apple-sponsored compiler.

  16. The compiler testing data in full is available from this mailing list post.
复制代码
打算过段时间在虚拟机上体验下FreeBSD 10-Current

评分

参与人数 2可用积分 +4 收起 理由
ulovko + 2 欢迎分享 ^_^
gvim + 2 感谢分享

查看全部评分

论坛徽章:
54
2017金鸡报晓
日期:2017-02-08 10:39:42操作系统版块每日发帖之星
日期:2016-03-08 06:20:00操作系统版块每日发帖之星
日期:2016-03-07 06:20:00操作系统版块每日发帖之星
日期:2016-02-22 06:20:00操作系统版块每日发帖之星
日期:2016-01-29 06:20:00操作系统版块每日发帖之星
日期:2016-01-27 06:20:00操作系统版块每日发帖之星
日期:2016-01-20 06:20:00操作系统版块每日发帖之星
日期:2016-01-06 06:20:0015-16赛季CBA联赛之江苏
日期:2015-12-21 20:00:24操作系统版块每日发帖之星
日期:2015-12-21 06:20:00IT运维版块每日发帖之星
日期:2015-11-17 06:20:002015亚冠之广州恒大
日期:2015-11-12 10:58:02
2 [报告]
发表于 2012-09-06 14:44 |只看该作者
有人测试过编译后程序的运行速度吗?

论坛徽章:
3
白羊座
日期:2013-11-05 12:59:14子鼠
日期:2014-01-29 14:14:50戌狗
日期:2014-02-11 16:21:45
3 [报告]
发表于 2012-09-07 11:04 |只看该作者
编译得快是一方面,更重要的是编译出来的东西跑得快不快。

论坛徽章:
1
射手座
日期:2013-08-21 13:11:46
4 [报告]
发表于 2012-09-07 12:56 |只看该作者
本帖最后由 egmkang 于 2012-09-07 13:02 编辑
ahocat 发表于 2012-09-07 11:04
编译得快是一方面,更重要的是编译出来的东西跑得快不快。


还好啊

我自己写的demo, lock free的message queue,clang 3.1 + libc++比gcc 4.6.3 + libstdc++速度快一倍以上

论坛徽章:
0
5 [报告]
发表于 2012-09-07 14:29 |只看该作者
经常看到 http://www.phoronix.com/ 有测试,不知道是如何测试的

论坛徽章:
29
技术图书徽章
日期:2013-09-02 19:59:502015元宵节徽章
日期:2015-03-06 15:51:332015小元宵徽章
日期:2015-03-06 15:57:20操作系统版块每日发帖之星
日期:2015-08-16 06:20:002015七夕节徽章
日期:2015-08-21 11:06:17操作系统版块每日发帖之星
日期:2015-09-21 06:20:002015亚冠之水原三星
日期:2015-10-30 00:06:07数据库技术版块每日发帖之星
日期:2015-12-24 06:20:0015-16赛季CBA联赛之上海
日期:2016-01-07 10:32:07操作系统版块每日发帖之星
日期:2016-01-08 06:20:00操作系统版块每日发帖之星
日期:2016-05-18 06:20:00IT运维版块每日发帖之星
日期:2016-07-23 06:20:00
6 [报告]
发表于 2012-09-07 18:29 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
20
CU大牛徽章
日期:2013-04-17 11:48:26羊年新春福章
日期:2015-03-10 22:39:202015年中国系统架构师大会
日期:2015-06-29 16:11:282015亚冠之平阳省
日期:2015-07-31 09:19:042015七夕节徽章
日期:2015-08-21 11:06:17IT运维版块每日发帖之星
日期:2015-09-30 06:20:002015亚冠之柏太阳神
日期:2015-10-19 20:29:5915-16赛季CBA联赛之天津
日期:2016-11-29 14:03:4315-16赛季CBA联赛之北控
日期:2016-12-24 20:51:492015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-12 20:58:532014年中国系统架构师大会
日期:2014-10-14 15:59:00
7 [报告]
发表于 2012-09-07 19:46 |只看该作者
这个玩意,看起来不错
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP