From: Peter Seibel
Subject: Anyone want to lob some hand grenades into a language war?
Date: 
Message-ID: <m3pt2m903o.fsf@javamonkey.com>
Over on the computer-go mailing list there's a nice C vs Java
performance pissing match going on (one camp claims Java as 3x slower
than C; the other camp claims Java only loses around 30% of C's
performance). Anyway, one of the topics in the endless thread is this
fairly simple program which is available in both C and Java:

  <http://homepages.cwi.nl/~tromp/c4/fhour.html>

I'm sort of busy trying to finish my book or I'd take a crack at this
myself but maybe someone else is bored and would be interested in
translating the program to Common Lisp and tuning it up to see how
Common Lisp compares. It looks about like the kind of thing that the
tuning guru's around here can usually optimize within an inch of its
life.

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp

From: Jeff
Subject: Re: Anyone want to lob some hand grenades into a language war?
Date: 
Message-ID: <yfdkd.78203$R05.58083@attbi_s53>
Peter Seibel wrote:

> there's a nice C vs Java
> performance pissing match going on (one camp claims Java as 3x slower
> than C; the other camp claims Java only loses around 30% of C's
> performance).

If these are truely he claims, then there was a nice chuckle on this
side of the world -- as neither side can multiple and realize they
agree ;)

Jeff M.

-- 
(surf-to "http://www.retrobyte.org/")
(mail-to (concatenate 'string "massung" ·@" "gmail.com"))
From: David Sletten
Subject: Re: Anyone want to lob some hand grenades into a language war?
Date: 
Message-ID: <Prdkd.46085$hN1.30972@twister.socal.rr.com>
Jeff wrote:

> Peter Seibel wrote:
> 
> 
>>there's a nice C vs Java
>>performance pissing match going on (one camp claims Java as 3x slower
>>than C; the other camp claims Java only loses around 30% of C's
>>performance).
> 
> 
> If these are truely he claims, then there was a nice chuckle on this
> side of the world -- as neither side can multiple and realize they
> agree ;)
> 
> Jeff M.
> 
I think Peter (or the claimants) means 130% of C's speed vs. 300% rather 
than Java is 3x C and C is 1/3x Java... Of course, 3x slower might mean 
400% if taken literally.

David Sletten
From: Gareth McCaughan
Subject: Re: Anyone want to lob some hand grenades into a language war?
Date: 
Message-ID: <871xf19b28.fsf@g.mccaughan.ntlworld.com>
David Sletten <·····@slytobias.com> writes:

> Jeff wrote:
> 
> > Peter Seibel wrote:
> >
> >>there's a nice C vs Java
> >>performance pissing match going on (one camp claims Java as 3x slower
> >>than C; the other camp claims Java only loses around 30% of C's
> >>performance).
> > If these are truely he claims, then there was a nice chuckle on this
> > side of the world -- as neither side can multiple and realize they
> > agree ;)
> > Jeff M.
> >
> I think Peter (or the claimants) means 130% of C's speed vs. 300%
> rather than Java is 3x C and C is 1/3x Java... Of course, 3x slower
> might mean 400% if taken literally.

Er, no, they clearly mean 70% and 33ish%.

-- 
Gareth McCaughan
.sig under construc
From: David Sletten
Subject: Re: Anyone want to lob some hand grenades into a language war?
Date: 
Message-ID: <7itkd.40686$jo2.17917@twister.socal.rr.com>
Gareth McCaughan wrote:

> David Sletten <·····@slytobias.com> writes:
> 

>>>>there's a nice C vs Java
>>>>performance pissing match going on (one camp claims Java as 3x slower
>>>>than C; the other camp claims Java only loses around 30% of C's
>>>>performance).
>>>
>>>If these are truely he claims, then there was a nice chuckle on this
>>>side of the world -- as neither side can multiple and realize they
>>>agree ;)
>>>Jeff M.
>>>
>>
>>I think Peter (or the claimants) means 130% of C's speed vs. 300%
>>rather than Java is 3x C and C is 1/3x Java... Of course, 3x slower
>>might mean 400% if taken literally.
> 
> 
> Er, no, they clearly mean 70% and 33ish%.
> 
First of all, who do you mean by 'they'? Have you read the actual thread 
and do you have some insight I'm missing? I'm going by what Peter posted.

Secondly, I take 'they clearly mean 70%' to represent the position of 
the 2nd group mentioned above who claim that Java only loses about 30% 
of C's performance. Well, what exactly does 'lose 30% of C's 
performance' mean? To me this ambiguous statement could be talking about 
execution speed or execution time. If we interpret it to imply execution 
time, then it says that the Java code is 30% slower than the C sample. 
Ergo it takes 130% of the time that the C code takes. Now, looking at 
what I wrote earlier I see that I didn't word this correctly. I should 
have used the phrase 'execution time' rather than 'speed'.

On the other hand, if we take 'lose 30% of C's performance' to mean that 
the speed of the Java code is only 70% of the C version, then this 
implies that the Java takes 143% of the time that the C version uses.

Furthermore, as I pointed out originally, '3x slower' is sometimes used 
literally and sometimes used to mean '3 times as slow'. The first usage 
means '4 times as slow'.

So while all of this seems 'clear' to you I'm not quite so convinced.

David Sletten
From: Gareth McCaughan
Subject: Re: Anyone want to lob some hand grenades into a language war?
Date: 
Message-ID: <873bzh6z5k.fsf@g.mccaughan.ntlworld.com>
David Sletten <·····@slytobias.com> writes:

> Gareth McCaughan wrote:
> 
> > David Sletten <·····@slytobias.com> writes:
> >
> 
> >>>>there's a nice C vs Java
> >>>>performance pissing match going on (one camp claims Java as 3x slower
> >>>>than C; the other camp claims Java only loses around 30% of C's
> >>>>performance).
> >>>
> >>>If these are truely he claims, then there was a nice chuckle on this
> >>>side of the world -- as neither side can multiple and realize they
> >>>agree ;)
> >>>Jeff M.
> >>>
> >>
> >>I think Peter (or the claimants) means 130% of C's speed vs. 300%
> >>rather than Java is 3x C and C is 1/3x Java... Of course, 3x slower
> >>might mean 400% if taken literally.
> > Er, no, they clearly mean 70% and 33ish%.
> >
> First of all, who do you mean by 'they'? Have you read the actual
> thread and do you have some insight I'm missing? I'm going by what
> Peter posted.

No, I'm going by what Peter posted too.

"Java is 3x slower than C" means that Java's speed is 1/3 of C's,
which is about 33%. "Java loses around 30% of C's speed" means
"Java has around (100-30)% of C's speed", which is to say around 70%.

> Secondly, I take 'they clearly mean 70%' to represent the position of
> the 2nd group mentioned above who claim that Java only loses about 30%
> of C's performance. Well, what exactly does 'lose 30% of C's
> performance' mean? To me this ambiguous statement could be talking
> about execution speed or execution time. If we interpret it to imply
> execution time, then it says that the Java code is 30% slower than the
> C sample. Ergo it takes 130% of the time that the C code takes. Now,
> looking at what I wrote earlier I see that I didn't word this
> correctly. I should have used the phrase 'execution time' rather than
> 'speed'.

Right. Then we are very nearly in violent agreement, having
established that you meant the opposite of what you wrote :-).

(The "very nearly" is because I don't think I'd ever say
"loses 30% of C's speed" to mean "takes an extra 30% on top
of C's time". But the two turn out to mean roughly the same,
and no one is claiming that these numbers are very precise
anyway.)

-- 
Gareth McCaughan
.sig under construc
From: David Sletten
Subject: Re: Anyone want to lob some hand grenades into a language war?
Date: 
Message-ID: <u6ykd.82101$Kl3.10043@twister.socal.rr.com>
Gareth McCaughan wrote:


> Right. Then we are very nearly in violent agreement, having
> established that you meant the opposite of what you wrote :-).
> 

Well, I don't think any violence has to be involved...not even any ill 
will. :)

> (The "very nearly" is because I don't think I'd ever say
> "loses 30% of C's speed" to mean "takes an extra 30% on top
> of C's time". But the two turn out to mean roughly the same,
> and no one is claiming that these numbers are very precise
> anyway.)
> 

I agree that it would be odd to interpret 'loses 30% of C's speed' that 
way. But for the record, the claim was 'loses 30% of C's performance', 
which is more ambiguous.

David Sletten
From: Tim Bradshaw
Subject: Re: Anyone want to lob some hand grenades into a language war?
Date: 
Message-ID: <ey3sm7iyt6a.fsf@cley.com>
* Peter Seibel wrote:
> Over on the computer-go mailing list there's a nice C vs Java
> performance pissing match going on (one camp claims Java as 3x slower
> than C; the other camp claims Java only loses around 30% of C's
> performance). 

And of course, since playing go is going to be a mass of algorithms
with complexities much worse than linear this is just *so* relevant.

--tim