"Richard Heathfield" <rjh@[EMAIL PROTECTED]
> wrote in message
news:YKmdnTjH8aINu73VnZ2dnUVZ8uKdnZ2d@[EMAIL PROTECTED]
> Bartc said:
>
>> [copy of post sent to c.l.c++]
>> "Richard Heathfield" <rjh@[EMAIL PROTECTED]
> wrote in message
>> news:-9OdnXIZ5Pjbgr3VnZ2dneKdnZydnZ2d@[EMAIL PROTECTED]
>>> Razii said:
>>>
>>>> On Tue, 06 May 2008 08:28:15 +0000, Richard Heathfield
>>>> <rjh@[EMAIL PROTECTED]
> wrote:
>>>>
>>>>>C: 0.003
>>>>>C++: 0.021
>>>>>Java: 0.058
>>>>
>>>> I haven't tested your C version yet, but these times are too low.
>>>
>>> I thought that getting the lowest time was the whole point!
>>>
>>> But to put your mind at rest, these times are for the 6KB test file. I
>>> couldn't be bothered to go looking for the 14MBer.
>>
>> These timings do look too low to be measured accurately.
>
> I sometimes wonder about this universe. Did nobody see what I wrote
> originally? And I quote: "I conclude on the basis of this FULLY
> REPRESENTATIVE AND STATISTICALLY SIGNIFICANT SAMPLE that C rocks, Java
> sucks, and C++ isn't sure which it is."
>
> Now then, let's start simple. Can you spell "iron"? And do you know what
> it
> means? If so, we can build up from there.
>
>> It's possible C++ and Java have some start-up delays in which case you
>> cannot compare /runtimes/ reliably.
>
> Rubbish. It takes how long it takes. If WonderfulNewLanguage*= can
process
> the data in a time comparable to, say, Java, *provided* you discount
> WonderfulNewLanguage*='s 20-minute startup delay, does that mean
> WonderfulNewLanguage*= is as good at Java over that "distance"? Clearly
> not. When you're racing for money, you don't give head starts.
But the Java startup isn't 1200000ms; whatever it is, it's no more than
58ms
in this case, which is insignificant; probably less than the time it took
to
press the Enter key or click the button to start the test.
Suppose the C startup was 0ms, and that of Java was 50ms. And supposing
you
were testing an empty program, which, with inevitable OS overheads
(loading
the executable etc), took 1ms in each case. 1ms and 51ms. What would you
conclude from that? That Java is 50x faster? And if the overhead was only
0.1ms, that Java was 500x faster? And if the overhead was 10ms, that Java
was only 6x faster?
If someone is really interested in how much faster Java is than C, I would
not trust your tests. Because with timings at these level, the figures are
unreliable.
--
Bartc


|