MPC5121浮点运行能力测试

 

引用: 

浮点优化选项 -ffast-math:极大地提高浮点运算速度

http://blog.csdn.net/zjujoe/archive/2008/07/02/2604157.aspx

非常感谢,这是我在MPC5121上的运行结果:

测试1,带ffast-math

编译选项:CFLAGS= -O3 -mcpu=603e -fomit-frame-pointer -pipe -fsigned-char -funroll-loops -mhard-float -ffast-math

 

[root@EMA-Polar floattest]# ./floattest_songlixin

Start time is: 0.0

DIV End time is: 0.59649

MUL End time is: 0.119019

ADD End time is: 0.171965

SUB End time is: 0.224903

result1:37944672758190.882812

测试2,不带ffast-math

编译选项:CFLAGS= -O3 -mcpu=603e -fomit-frame-pointer -pipe -fsigned-char -funroll-loops -mhard-floa

[root@EMA-Polar floattest]# ./floattest_songlixin

Start time is: 0.0

DIV End time is: 0.319820

MUL End time is: 0.379179

ADD End time is: 0.432115

SUB End time is: 0.485192

result1:37944672758190.882812

 

测试3,软件模拟浮点,结果竟然是0

编译选项:CFLAGS= -O3 -mcpu=603e -fomit-frame-pointer -pipe -fsigned-char -funroll-loops -msoft-float

[root@EMA-Polar floattest]# ./floattest_songlixin

Start time is: 0.0

DIV End time is: 0.75

MUL End time is: 0.95

ADD End time is: 0.99

SUB End time is: 0.106

result1:0.000000

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值