Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Shootout (fannk...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 18 Topic 45754 of 45898
Post > Topic >>

Shootout (fannkuch)

by Razii <tynkfghf@[EMAIL PROTECTED] > May 5, 2008 at 01:54 AM

On Wed, 30 Apr 2008 08:00:38 -0700 (PDT), Isaac Gouy
<igouy2@[EMAIL PROTECTED]
> wrote:

>Why don't you go through all...

This time I am going to demonstrate a very serious problem with the
shootout site. 

The algorithms used by C, C++, and D are BETTER than the Java
versions! What the heck? In some cases Java version is so bad that
it's 10 times slower. 

Let's start over again. We go through the list one by one. 

You have this version of Java for fannkuch

http://shootout.alioth.debian.org/gp4/benchmark.php?test=fannkuch&lang=java&id=2

I wrote a different version (algorithm used by Heiner Marxen)

http://pastebin.com/f41c2ef6f

When n = 11

0m10.165s -client (old version)
0m6.064s  -client (this new version) 

4 seconds faster...

Let's compare it now with C++ version

http://shootout.alioth.debian.org/gp4/benchmark.php?test=fannkuch&lang=gpp&id=2

g++ -pipe -O3 -fomit-frame-pointer fannkuch.cpp -o fannkuch.exe
jc -inline+ fannkuch (java native compiler)

N        9      10       11 
g++    0.115s  0.442s   4.542s
java   0.206s  0.596s   5.970s (-client) 
jet    0.310s  4.355s   4.355s

I used -client since it's faster than -server in this case. Jet in
this case beats g++ with n = 11. With n = 12, difference is even
bigger 1m1.187s v 0m56.697s




 18 Posts in Topic:
Shootout (fannkuch)
Razii <tynkfghf@[EMAIL  2008-05-05 01:54:16 
Re: Shootout (fannkuch)
Razii <tynkfghf@[EMAIL  2008-05-05 04:03:34 
Re: Shootout (fannkuch)
Razii <tynkfghf@[EMAIL  2008-05-05 04:47:43 
Re: Shootout (fannkuch)
Sherman Pendley <spamt  2008-05-05 05:47:08 
Re: Shootout (fannkuch)
Razii <tynkfghf@[EMAIL  2008-05-05 06:12:14 
Re: Shootout (fannkuch)
Razii <jhgf@[EMAIL PRO  2008-05-05 06:12:34 
Re: Shootout (fannkuch)
Branimir Maksimovic <b  2008-05-05 03:10:37 
Re: Shootout (fannkuch)
Razii <gjtrsds@[EMAIL   2008-05-05 06:51:41 
Re: Shootout (fannkuch)
Isaac Gouy <igouy2@[EM  2008-05-05 08:27:23 
Re: Shootout (fannkuch)
Razii <gjtrsds@[EMAIL   2008-05-05 12:21:00 
Re: Shootout (fannkuch)
Andrea Francia <andrea  2008-05-05 13:06:30 
Re: Shootout (fannkuch)
Joshua Cranmer <Pidgeo  2008-05-05 23:29:50 
Re: Shootout (partialsums)
Razii <gjgjdfyt@[EMAIL  2008-05-05 11:54:29 
Re: Shootout (partialsums)
"Peter Duniho"   2008-05-05 10:11:39 
Re: Shootout (partialsums)
Andrea Francia <andrea  2008-05-05 20:41:48 
Re: Shootout (partialsums)
Razii <jghgg@[EMAIL PR  2008-05-05 17:53:40 
Re: Shootout (partialsums)
Lew <lew@[EMAIL PROTEC  2008-05-05 22:36:40 
Re: Shootout (partialsums)
"kwikius" <a  2008-05-05 19:50:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 2:34:12 CDT 2008.