枪战:基准游戏。 [英] Shootout: the benchmarks game.

查看:89
本文介绍了枪战:基准游戏。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下一个:


fannkuch基准

(c ++)
http://shootout.alioth.debian.org/gp...&lang= gpp& id = 2

(java)

g ++ -pipe -O3 -fomit-frame-pointer -finline-functions fannkuch.cpp -o

fannkuch.exe -march = native


jc -inline + fannkuch.class


时间秒当N增加

N 9 10 11

g ++ 0.047s 0.392s 5.013s

JVM 0.180s 0.689s 7.057s(-server -Xms64m) )

JET 0.278s 0.820s 7.792s


C ++版本更快;然而,(给定JIT编译需要时间),

差异随着n = 11而减小。当n = 12(不包括在

枪战网站中)时,差异是均匀的较小的


1m34.648s(-server -Xms64m)

1m7.465s(g ++)


任何在这种情况下,JVM再次(略微)快于JET本机编译器


解决方案

On Sun,20 2008年4月18:40:34 -0500,Razii< wh ********** @ hotmail.com>

写道:


> fannkuch基准
(c ++)
http://shootout.alioth.debian.org/gp...&lang=gpp&id=2
( java)

http://shootout.alioth.debian.org/gp...l ang = java& id = 2


" Razii" < wh ********** @ hotmail.comwrote in message

新闻:pg ******************** ************ @ 4ax.com ...


下一页:


fannkuch基准

(c ++)
http://shootout.alioth.debian.org/gp...&lang=gpp&id=2

( java)


g ++ -pipe -O3 -fomit-frame-pointer -finline-functions fannkuch.cpp -o

fannkuch.exe -march = native


jc -inline + fannkuch.class


N增加的时间以秒为单位

N 9 10 11
g ++ 0.047s 0.392s 5.013s

JVM 0.180s 0.689s 7.057s(-server -Xms64m)

JET 0.278s 0.820s 7.792s


C ++版本更快;然而,(给定JIT编译需要时间),

差异随着n = 11而减小。当n = 12(不包括在

枪战网站中)时,差异是均匀的较小的


1m34.648s(-server -Xms64m)

1m7.465s(g ++)


任何在这种情况下,JVM再次(略微)快于JET本机编译器




尝试使用N = 9,10,11请这些!


C ++: http://pastebin.com/m6db54f31

Java: http://pastebin.com/m15714c90

谢谢。以下是我在P4 3.06ghz 512mb系统上获得的结果:


构建标志

__________________________________________________ _____

C ++ :/ O2 / Ob2 / Oi / Ot / Oy / GL / D" WIN32" / DNDEBUG / D_CONSOLE / D

" _UNICODE" / DUNICODE / FD / EHsc / MT / Fo释放\\ /Fd"Release\vc80.pdb"

/ W3 / nologo / c / Wp64 / Zi / Gr / TP / errorReport:提示


Java: -server -Xms64m


测试结果

P4 3.06ghz 512mb

__________________________________________________ _____

C ++:N = 12 /时间:47 ms

Java:N = 12 /时间:94 ms

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

C ++:N = 13 /时间:79 ms

Java:N = 13 /时间:140 ms

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

C ++:N = 14 /时间:172毫秒

Java:N = 14 /时间:250毫秒

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

C ++ :N = 15 /时间:344毫秒

Java:N = 15 /时间:485毫秒

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

C ++: N = 16 /时间:828毫秒

Java:N = 16 /时间:1156毫秒

---------------- ---------------------------------------
C ++:N = 17 /时间:1954 ms

Java:N = 17 /时间:2359 ms

------- ------------------------------------------------ <无线电通信/>
C ++:N = 18 /时间:4485 ms

Java:N = 18 /时间:7468 ms

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

C ++:N = 19 /时间:11609 ms

Java:N = 19 /时间:15047 ms

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

C ++:N = 20 /时间:58891 ms

Java:N = 20 / CRASHED! OutOfMemoryError:Java堆空间

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

C ++:N = 21 / BOOOOOOM!

Java:N = 21 / CRASHED! OutOfMemoryError:Java堆空间

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


有什么想法吗?


< blockquote>" Chris Thomasson" < cr ***** @ comcast.netwrote in message

新闻:Dv ************************* *****@comcast.com。 ..

[...]


请尝试使用N = 9,10,11请!

C ++: http://pastebin.com/m6db54f31

Java: http://pastebin.com/m15714c90


谢谢。以下是我在P4 3.06ghz 512mb系统上获得的结果:


构建标志

__________________________________________________ _____

C ++ :/ O2 / Ob2 / Oi / Ot / Oy / GL / D" WIN32" / DNDEBUG / D_CONSOLE / D



[...]


C ++ == VC8


Next:

fannkuch benchmark
(c++)
http://shootout.alioth.debian.org/gp...&lang=gpp&id=2
(java)

g++ -pipe -O3 -fomit-frame-pointer -finline-functions fannkuch.cpp -o
fannkuch.exe -march=native

jc -inline+ fannkuch.class

Time in secs as N increases
N 9 10 11
g++ 0.047s 0.392s 5.013s
JVM 0.180s 0.689s 7.057s (-server -Xms64m)
JET 0.278s 0.820s 7.792s

C++ version is faster; however, (given JIT compilation takes time),
the difference decreases with n = 11. With n = 12 (not included in
shootout site), the difference is even smaller

1m34.648s (-server -Xms64m)
1m7.465s (g++)

In any case, JVM is again (slightly) faster than JET native compiler
in this case.

解决方案

On Sun, 20 Apr 2008 18:40:34 -0500, Razii <wh**********@hotmail.com>
wrote:

>fannkuch benchmark
(c++)
http://shootout.alioth.debian.org/gp...&lang=gpp&id=2
(java)

http://shootout.alioth.debian.org/gp...lang=java&id=2


"Razii" <wh**********@hotmail.comwrote in message
news:pg********************************@4ax.com...

Next:

fannkuch benchmark
(c++)
http://shootout.alioth.debian.org/gp...&lang=gpp&id=2
(java)

g++ -pipe -O3 -fomit-frame-pointer -finline-functions fannkuch.cpp -o
fannkuch.exe -march=native

jc -inline+ fannkuch.class

Time in secs as N increases
N 9 10 11
g++ 0.047s 0.392s 5.013s
JVM 0.180s 0.689s 7.057s (-server -Xms64m)
JET 0.278s 0.820s 7.792s

C++ version is faster; however, (given JIT compilation takes time),
the difference decreases with n = 11. With n = 12 (not included in
shootout site), the difference is even smaller

1m34.648s (-server -Xms64m)
1m7.465s (g++)

In any case, JVM is again (slightly) faster than JET native compiler
in this case.

Try these with N = 9, 10, 11 Please!

C++: http://pastebin.com/m6db54f31
Java: http://pastebin.com/m15714c90
Thank you. Here is results I get on a P4 3.06ghz 512mb system:


Build Flags
__________________________________________________ _____
C++: /O2 /Ob2 /Oi /Ot /Oy /GL /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D
"_UNICODE" /D "UNICODE" /FD /EHsc /MT /Fo"Release\\" /Fd"Release\vc80.pdb"
/W3 /nologo /c /Wp64 /Zi /Gr /TP /errorReport:prompt

Java: -server -Xms64m


Test Results
P4 3.06ghz 512mb
__________________________________________________ _____
C++: N = 12 / Time: 47 ms
Java: N = 12 / Time: 94 ms
-------------------------------------------------------
C++: N = 13 / Time: 79 ms
Java: N = 13 / Time: 140 ms
-------------------------------------------------------
C++: N = 14 / Time: 172 ms
Java: N = 14 / Time: 250 ms
-------------------------------------------------------
C++: N = 15 / Time: 344 ms
Java: N = 15 / Time: 485 ms
-------------------------------------------------------
C++: N = 16 / Time: 828 ms
Java: N = 16 / Time: 1156 ms
-------------------------------------------------------
C++: N = 17 / Time: 1954 ms
Java: N = 17 / Time: 2359 ms
-------------------------------------------------------
C++: N = 18 / Time: 4485 ms
Java: N = 18 / Time: 7468 ms
-------------------------------------------------------
C++: N = 19 / Time: 11609 ms
Java: N = 19 / Time: 15047 ms
-------------------------------------------------------
C++: N = 20 / Time: 58891 ms
Java: N = 20 / CRASHED! OutOfMemoryError: Java Heap space
-------------------------------------------------------
C++: N = 21 / BOOOOOOM!
Java: N = 21 / CRASHED! OutOfMemoryError: Java Heap space
-------------------------------------------------------

Any thoughts?


"Chris Thomasson" <cr*****@comcast.netwrote in message
news:Dv******************************@comcast.com. ..
[...]

Try these with N = 9, 10, 11 Please!

C++: http://pastebin.com/m6db54f31
Java: http://pastebin.com/m15714c90
Thank you. Here is results I get on a P4 3.06ghz 512mb system:


Build Flags
__________________________________________________ _____
C++: /O2 /Ob2 /Oi /Ot /Oy /GL /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D

[...]

C++ == VC8


这篇关于枪战:基准游戏。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆