super_pi under Linux VS. super_pi under Windows

不同视角、不同观点、深度探讨,禁止人品和道德攻击
PhoenixJ
帖子: 1492
注册时间: 2007-08-09 3:33
系统: Windows 12.04

super_pi under Linux VS. super_pi under Windows

#1

帖子 PhoenixJ » 2007-09-06 5:04

测试了一下(2的20次方,104万位左右),发现Feisty Fawn下面的super_pi要比vista下面的快很多。
Linux: 24.142( 0.892) Sec
Vista:32秒。

不知道大家的测试结果如何。

Version 2.0 of the super_pi for Linux OS
Fortran source program was translated into C program with version 19981204 of
f2c, then generated C source program was optimized manually.
pgcc 3.2-3 with compile option of "-fast -tp px -Mbuiltin -Minline=size:1000 -Mnoframe -Mnobounds -Mcache_align -Mdalign -Mnoreentrant" was used for the
compilation.
------ Started super_pi run : 2007年 09月 06日 星期四 04:58:04 CST
Start of PI calculation up to 1048576 decimal digits
End of initialization. Time= 0.376 Sec.
I= 1 L= 0 Time= 1.092 Sec.
I= 2 L= 0 Time= 1.256 Sec.
I= 3 L= 1 Time= 1.228 Sec.
I= 4 L= 2 Time= 1.220 Sec.
I= 5 L= 5 Time= 1.220 Sec.
I= 6 L= 10 Time= 1.216 Sec.
I= 7 L= 21 Time= 1.212 Sec.
I= 8 L= 43 Time= 1.216 Sec.
I= 9 L= 87 Time= 1.216 Sec.
I=10 L= 174 Time= 1.208 Sec.
I=11 L= 349 Time= 1.212 Sec.
I=12 L= 698 Time= 1.204 Sec.
I=13 L= 1396 Time= 1.208 Sec.
I=14 L= 2794 Time= 1.200 Sec.
I=15 L= 5588 Time= 1.204 Sec.
I=16 L= 11176 Time= 1.192 Sec.
I=17 L= 22353 Time= 1.176 Sec.
I=18 L= 44707 Time= 1.144 Sec.
I=19 L= 89415 Time= 1.072 Sec.
End of main loop
End of calculation. Time= 24.009 Sec.
End of data output. Time= 0.132 Sec.
Total calculation(I/O) time= 24.142( 0.892) Sec.
------ Ended super_pi run : 2007年 09月 06日 星期四 04:58:28 CST

super_pi不是free的,所以抱歉先不提供下载了,需要的言语一声。
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#2

帖子 skyx » 2007-09-06 8:27

楼上所说的“linux版 super pi”其实 到处都可以下载的东东.................

源中的pi才叫强:
BigSnake.NET 写了:

代码: 全选

sudo apt-get install pi
比super pi 快很多

这个才是原生的,104万位一般就15秒以内。
no security measure is worth anything if an attacker has physical access to the machine
头像
www1862
帖子: 781
注册时间: 2006-05-12 0:52
来自: Chongqing China
联系:

#3

帖子 www1862 » 2007-09-06 8:43

楼主被打击了。 :em04 :em06 :em08 :em26
PhoenixJ
帖子: 1492
注册时间: 2007-08-09 3:33
系统: Windows 12.04

#4

帖子 PhoenixJ » 2007-09-06 10:02

skyx 写了:楼上所说的“linux版 super pi”其实 到处都可以下载的东东.................

源中的pi才叫强:
BigSnake.NET 写了:

代码: 全选

sudo apt-get install pi
比super pi 快很多

这个才是原生的,104万位一般就15秒以内。
多谢,不过这个没有计时功能哈。

我只是想对比一下Vista和U的计算速度,不是想要Pi...

有什么其他合适的同一家出的多平台的测试软件么?

and to 楼上:

呵呵,应该说Vista受打击了,打击的好~
PhoenixJ
帖子: 1492
注册时间: 2007-08-09 3:33
系统: Windows 12.04

#5

帖子 PhoenixJ » 2007-09-06 10:04

:~$ time pi 1000000 > piresult

real 0m10.340s
user 0m10.245s
sys 0m0.096s

果然很快。

不过这和Win下面的SuperPi的算法未必相同。

本帖只是想验证一下两个操作系统处理浮点数的速度差异——所以必须是一样的(或者类似的)算法。
头像
bones7456
帖子: 8495
注册时间: 2006-04-12 20:05
来自: 杭州
联系:

#6

帖子 bones7456 » 2007-09-06 10:08

据说这个没啥可比性。。。
关注我的blog: ε==3
头像
zhuqin_83
帖子: 10606
注册时间: 2006-05-13 4:02
联系:

#7

帖子 zhuqin_83 » 2007-09-06 10:35

这个我半年前就写过了。
HP Pavilion DV6-2064CA: AMD Turion II Ultra Dual-Core Mobile M640, HD4650, 2GBx2 DDR2-800, Seagate 500GB 7200RPM SATA, BD-ROM
DELL UltraSharp 2209WA
Arch64, Testing repo
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#8

帖子 skyx » 2007-09-06 11:06

wine 或vbox xp 中运行win版super pi 也不会比在vista 中慢的
no security measure is worth anything if an attacker has physical access to the machine
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#9

帖子 skyx » 2007-09-06 11:09

PhoenixJ 写了::~$ time pi 1000000 > piresult



本帖只是想验证一下两个操作系统处理浮点数的速度差异——所以必须是一样的(或者类似的)算法。
科学计算方面,linux比win快, 基本上相当于硬件上领先两年左右的水平
no security measure is worth anything if an attacker has physical access to the machine
头像
jarryson
帖子: 4002
注册时间: 2005-08-14 19:53

#10

帖子 jarryson » 2007-09-06 11:31

intel的cpu对super pi做过优化,较amd的有优势.这个上面amd赶不上intel的.不过一个测试成绩代表不了什么.

linux上和win上的程序未必一样

所以综上,super pi不公平,做评比没有说服力
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#11

帖子 skyx » 2007-09-06 11:43

PhoenixJ 写了:


本帖只是想验证一下两个操作系统处理浮点数的速度差异——所以必须是一样的(或者类似的)算法。
super pi其实是整数运算。是运用大的数组和整书运算,大精度数的计算,必然是纯整数的;浮点会导致累积误差。

因为Super Pi的性能构成比较复杂,整数性能关系也非常大,对Cache也很依赖,单纯提高了x87浮点性能所带来的增益很有限。不能使用Super Pi速度来衡量浮点性能。
no security measure is worth anything if an attacker has physical access to the machine
头像
猛将兄
帖子: 2052
注册时间: 2005-10-19 17:33

#12

帖子 猛将兄 » 2007-09-06 11:49

是的。skyx小mm看来对计算机组成还是比较熟哈。大运算都是整数运算。FPU浮点运算器实际上只是在不精确计算的时候使用的。误差相当大。这就有了在编程时候,涉及到浮点数的时候,都不能用==操作符来做。一般都是差的绝对值在1e-6之内即可
头像
xhy
帖子: 3916
注册时间: 2005-12-28 1:16
系统: Ubuntu 12.10 X64
来自: 火星

#13

帖子 xhy » 2007-09-06 12:00

100W不到5s
1000W不到100s
目前负债150多万
头像
xhy
帖子: 3916
注册时间: 2005-12-28 1:16
系统: Ubuntu 12.10 X64
来自: 火星

#14

帖子 xhy » 2007-09-06 12:00

100W不到5s
1000W不到100s
目前负债150多万
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#15

帖子 skyx » 2007-09-06 12:06

猛将兄 写了:是的。skyx小mm看来对计算机组成还是比较熟哈。大运算都是整数运算。FPU浮点运算器实际上只是在不精确计算的时候使用的。误差相当大。这就有了在编程时候,涉及到浮点数的时候,都不能用==操作符来做。一般都是差的绝对值在1e-6之内即可
没有,我高中没毕业,我只是想当然: 如果把那pi 的极数公式直接抄到程式中,变量定义为浮点的话,我想循环几次就会变得不收敛的。

这样计算出的pi 精度有可能比五千年前的古人算出的还差。
no security measure is worth anything if an attacker has physical access to the machine
回复