<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:osnews="http://osnews.com/rss2#">
	<channel>
		<title>OSNews: </title>
		<link>http://www.osnews.com/story/5602/Nine_Language_Performance_Round-up_Benchmarking_Math_File_I_O</link>
		<description>Exploring the Future of Computing</description>
		<language>en-us</language>
		<copyright>Copyright 2001-2009, David Adams</copyright>
		<webMaster>adam+nospam@osnews.com</webMaster>
		<lastBuildDate>Mon, 06 Jul 2009 03:37:55 GMT</lastBuildDate>
		<image>
			<url>http://www.osnews.com/images/osnews.gif</url>
			<title>OSNews.com</title>
			<link>http://www.osnews.com</link>
		</image>
		<item>
			<title>misses some test</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>What about a mono or portable.net test with the same benchmark ? I would be *very* curious of knowing which level of performance they can achieve.</description>
			<pubDate>Thu, 08 Jan 2004 19:41:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>gcc and python in their native environments?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I'm curious as to how much better gcc and python would perform in a POSIX environment, especially gcc linked to glibc rather than to the windows C libraries.<br />
<br />
Also, what happened to perl?</description>
			<pubDate>Thu, 08 Jan 2004 19:43:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Interesting... </title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>.. Any chance of trying the intel and the openwatcom compilers?<br />
<br />
.. It would also be interesting to try the benchmarks on another operating system to see if the same level of differences are observed.</description>
			<pubDate>Thu, 08 Jan 2004 19:43:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>All .net languages will perform the same!</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>All .net languages will perform exactly the same because they are all compiled down to the CLR comman language runtime.<br />
So your VB.net app will perform the same as C# and so will your Delphi.net, cobol.net etc etc etc.<br />
<br />
You only really need to benchmark C#</description>
			<pubDate>Thu, 08 Jan 2004 19:50:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: gcc and python in their native environments?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Perl is not a compile language... perhaps thats why it was left out. <br />
<br />
Mike</description>
			<pubDate>Thu, 08 Jan 2004 19:51:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Python is interpreted</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&gt;Perl is not a compile language... perhaps thats why it &gt;was left out. <br />
<br />
&gt;Mike<br />
<br />
Python is interpreted and it wasn't left out.</description>
			<pubDate>Thu, 08 Jan 2004 19:53:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE : All .net languages will perform the same</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>All .Net languages are not the same! while they might in simple cases produce the same MSIL code. In more complex situations they will not, leading ofcourse to diffenet results.</description>
			<pubDate>Thu, 08 Jan 2004 19:55:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Python is interpreted</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&gt;Python is interpreted and it wasn't left out.<br />
<br />
Actually... if you read the posting, he compiled the python code with Psyco. Also python is compiled into byte code at runtime for fast execution too. Perl does not behave like this nor can you compile it. So my commet remains. <br />
<br />
Mike</description>
			<pubDate>Thu, 08 Jan 2004 19:57:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title> RE : All .net languages will perform the same</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&gt;In more complex situations they will not, leading ofcourse to diffenet results. <br />
<br />
Well said Yoni.</description>
			<pubDate>Thu, 08 Jan 2004 19:58:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>How to remove the CLR</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&gt;&gt; Article: <i>I first tried to eliminate the CLR from the Visual C++ benchmark by turning off the language's &quot;managed&quot; features with the #pragma unmanaged directive, but I was surprised to see that this didn&amp;apos;t lead to any performance gains.</i><br />
<br />
Just start a new, unmanaged project and add your Standard C++ code to it.</description>
			<pubDate>Thu, 08 Jan 2004 19:59:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Python is interpreted</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Actually, if you read the posting, he benchmarked Python with Psyco, and also without, getting both.  And, if you read the posting, he also mentioned it would be interesting to see what Perl, PHP, and Ruby results would look like.</description>
			<pubDate>Thu, 08 Jan 2004 20:01:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re:</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Comparing server VM with client VM is invalid.<br />
He had to put both in both cases.<br />
<br />
I tested 1.4.2 vs. 1.3.1 (both SUN VMs) and 1.4.2 is 3 times slower than 1.3.1 (they rewrote the VM itself and System.arraycopy() that is being used everywhere got 3x slower). <br />
<br />
I have failed a bug report on that. Reply was: &quot;Too late&quot;, which disappointed me as this is a major regression and had to be caught by their QA people, not me.<br />
<br />
Well, let's hope that 1.5 they improve performance to 1.3.1 level.</description>
			<pubDate>Thu, 08 Jan 2004 20:01:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Virtual machine does not mean slower</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>The author states that he is surprised that java performs better than compiled code.... This really shouldn't be a surprise. The Java virtual machine compiles its code just like a c++ compiler. There is just one big difference. The c++ compiler compiles its code before it is run, and Java while it is being run. In other words, Java actually knows more about how the code is used, which in theory should let it reach better performance than c++. In real life though, its just recently (the last couple of years) that Java has actually approached (and in some cases passed) c++.</description>
			<pubDate>Thu, 08 Jan 2004 20:02:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Lisp?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I suggest he should benchmark Common Lisp (perhaps using Corman Common Lisp, Allegro or LispWorks on Windows). Common Lisp is a native-compiled language which provides even more dynamism than the popular interpreted languages like Perl, Python, Ruby and PHP. It's not hard to learn for someone used to these languages and may provide a nice surprise for the benchmark results.</description>
			<pubDate>Thu, 08 Jan 2004 20:03:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Java-1.4.2 trig is simple mistake</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>The default math library is compiled with -O0 to preserve strict IEEE semantics. In fact, with minor change to the source code, -O2 will work as well. Java has two math libs, Math and StrictMath. They are default to the same implementation. But JVM is allowed to use faster/less accurate version of Math. The VC++ uses loose math (x86 trig instructions directly).</description>
			<pubDate>Thu, 08 Jan 2004 20:04:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE:Python is interpreted</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Perl is compiled in a similar manner to python - it just isn't written to disk. Perl 6 more so - read about Parrot if you're interested. Why perl isn't included is really a question to the author and if I were to guess it would perform similarly to C++ since it generally wraps the standard libraries unless i/o is included in the bench - in which case there's a penalty for parsing the file...Then it should be comparable to python. How 'bout it Christopher - run a perl bench?<br />
<br />
Will</description>
			<pubDate>Thu, 08 Jan 2004 20:04:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Please post your sources</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Hello,<br />
<br />
Given the large differences between VB.net and C#, it is very likely you are doing something wrong. You may be mistakenly using a different construct. The `native' VB IO functions may be much slower than the standard CLR classes (System.IO). If you are using the Visual Basic library, you are not fairly testing the language. Again, you must post your source code to allow independant review.<br />
<br />
As well, I would love to run the C# tests on Mono.<br />
<br />
Another thing I should point out, most applications *DO NOT* involve intensive IO or Math alone. This is not a measure of true application performance. You are mearly measuring how well the JIT or compiler emits code for a specific case. I am sure any of the JIT developer could optimize for this specific test case. I think prehaps the more interesting view you could take is `what language provides highspeed building blocks -- such as collections classes, callback functionality, and object creation.' The answer to this question is *MUCH* less of a micro-benchmark.<br />
<br />
Also, I would add, for JIT'd languages, you should call the function you are requesting once before you do the call that you time. Depending on how you structure your run, you may end up counting JIT time. Although JIT time can matter in a 60 second benchmark, when running a web server for days, weeks or even months at a time it really does not matter. In fact, many applications use a native code precompiler to reduce startup time (under Mono, Miguel de Icaza often reports performance improvements of over 30% by using AOT compilation of our C# compiler mcs.exe [times are for the compilation of our mscorlib library, consisting of 1000 C# source files]). However, AOT does loose out in a large bench mark like this because it is forced to generate sub-optimal code (like a C++ compiler). So, it is much more fair to allow for a warm up runt to allow the runtime to JIT the code.<br />
<br />
-- Ben</description>
			<pubDate>Thu, 08 Jan 2004 20:05:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Thanks for taking the time to post the article.</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>It's funny that there are so many hardware sites that benchmark every aspect of CPU's, chipsets, and graphics cards, but few people bother to benchmark software, programming languages, and operating systems.</description>
			<pubDate>Thu, 08 Jan 2004 20:05:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: misses some test</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I would also like to see mono and portable .NET benchmarks. Also gcc in a POSIX environment. <br />
<br />
By the way, I liked the article - much higher quality than what you normally see here on osnews.</description>
			<pubDate>Thu, 08 Jan 2004 20:09:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Java, and legal considerations</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Firstly, Java code should, in the general best cases perform in the same manner as a well compiled C++ program. If we are doing pure loops and integer/FP tasks, there should be virtually nothing in it. A C++ compiler doing this properly should produce the same output as Java as a base case. A good C++ compiler using architecture optimisations should be able to do even better, though. The Java has the overhead of the VM and the JIT process, the additional predictiveness of which should be negated by a repetitive looping test anyway. Similarly, a well compiled benchmark from C and C++ should always be faster than a managed .Net application. The distance between the two will vary, but it should still be faster.<br />
<br />
These benchmarks are rather daft, anyway, since they manage to avoid using any sort of objects. Java is meaningless for most real tasks without creating and manipulating objects (otherwise you're basically writing C anyway), and objects are where Java really does slow down.<br />
<br />
Last of all, I'd like to draw the author's attention to the .Net framework EULAs... It is in fact a violation of the EULA to produce benchmarks of this sort of .Net against other platforms. Which is why they haven't been done all over the place by now <img src="/images/emo/smile.gif" alt=";)" /></description>
			<pubDate>Thu, 08 Jan 2004 20:11:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>total vs. geometric average?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Very interesting results. Sadly the sorting criteria (using the total instead of a geometric average) is unusual, and favors the languages that optimize the slow operations. The results of double math and trig show some big variations between languages (3:1 for double, more than 15:1 for trig) but this is not properly reflected in the results (in my humble opinion).<br />
<br />
Here are the numbers with the geometric average. Notice how Java 1.3.1 suddenly appears much slower than Visual J# or Java 1.4.2, and Python/Psyco is far ahead of Python (the arithmetic average doesn't show the improvement on the trig test).<br />
<br />
Visual C++: 8.4<br />
Visual C#: 11.1<br />
gcc C: 13.2<br />
Visual Basic: 13.9<br />
Visual J#: 14.2<br />
Java 1.4.2: 14.8<br />
Java 1.3.1: 18.6<br />
Python/Psyco: 47.9<br />
Python: 145.5<br />
<br />
Ignoring Python for the moment, it's interesting to see that Java 1.3.1 is the only one that is far off the lead on most tests. gcc only need to improve on trig and long math, Visual C#/Basic/J# all have issues with long math and double math, with Visual Basic and J# suffering from slow I/O.<br />
<br />
Java 1.4.2 has a very obvious and sever issue with trig. If that test was as fast as 1.3.1, Java 1.4.2 would score 12.2, very close to the lead. If it could be made to score 4.2 like Visual J#, that score would fall to 8.7, barely slower than Visual C++.<br />
<br />
The differences between the various MSIL/CLR languages is also very interesting. It's obvious that VC++ manages to issue better 64-bit code than the rest of the pack, and that I/O is the only differentiator between Visual C#, Basic and J#.</description>
			<pubDate>Thu, 08 Jan 2004 20:13:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Final note...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>If we're freely violating EULAs and all the rest of it, can anyone test the C++ code on Linux and the Java code on IBM's VM? Both should be quite different.</description>
			<pubDate>Thu, 08 Jan 2004 20:14:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Where for art thou Ruby?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I've been strongly considering picking Ruby up as my next language to learn, but it's hard to find a lot of information (recent info, at least) on it that's in English.<br />
<br />
I was hoping to see it benchmarked as well... That could have been the push I need to get learnin' it.<br />
<br />
Does anyone here know both Java, Python &amp; Ruby? Any thoughts as to speed, or reccomendations one way or the other?</description>
			<pubDate>Thu, 08 Jan 2004 20:15:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Please post your sources</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>He did, on the second page of the article:<br />
<br />
<a href="http://www.ocf.berkeley.edu/~cowell/research/benchmark/code/" rel="nofollow">http://www.ocf.berkeley.edu/~cowell/research/benchmark/code/</a></description>
			<pubDate>Thu, 08 Jan 2004 20:16:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>VC++</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I would have ran VC++ 6 instead of VC++ .NET (or whatever it is called). Since the author didn't know how to create an unmanaged project in VC++, I don't believe his results when it comes to VC++.<br />
<br />
I addition I run STLPort, instead of MS's STL, which is much faster.</description>
			<pubDate>Thu, 08 Jan 2004 20:16:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>mingw</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>My results for mingw (instead of cygwin) on my athlon xp 2.4<br />
(i just felt like i should test it <img src="/images/emo/smile.gif" alt=";)" /> <br />
<i><br />
Start C benchmark<br />
Int arithmetic elapsed time: 6125 ms with intMax of 1000000000<br />
 i: 1000000001<br />
 intResult: 1<br />
Double arithmetic elapsed time: 5687 ms with doubleMin 10000000000.000000, doubleMax 11000000000.000000<br />
 i: 11000000000.000000<br />
 doubleResult: 10011632717.388229<br />
Long arithmetic elapsed time: 20016 ms with longMin 10000000000, longMax 11000000000<br />
 i: 11000000000<br />
 longResult: 776627965<br />
Trig elapsed time: 6750 ms with max of 10000000<br />
 i: 10000000.000000<br />
 sine: 0.990665<br />
 cosine: -0.136322<br />
 tangent: -7.267119<br />
 logarithm: 7.000000<br />
 squareRoot: 3162.277502<br />
I/O elapsed time: 5484 ms with max of 1000000<br />
 last line: abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz12345678 90abcdefgh <br />
Total elapsed time: 44062 ms<br />
Stop C benchmark<br />
</i><br />
<br />
Great article btw.</description>
			<pubDate>Thu, 08 Jan 2004 20:18:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Completly useless!</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Doing so simple maths and IO tests is completly useless.  <br />
<br />
Real differences lies within string/character manipulations, memory allocations, searching, sorting, garbage collecting, virtual calls througs classes, etc..  <br />
<br />
If you have some more time to spend on this benchmark, try thoses.  Mileages will be much more differents.</description>
			<pubDate>Thu, 08 Jan 2004 20:23:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>More tests, and don't use the best of....</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Please don't post the best of only 3 runs, it's silly to do so because you are not getting a good sample of data.<br />
<br />
You should to have run more like 10 runs, especially because the micro-benchmarks that you have produced can be run automatically in the background many times withyou user intervention.  <br />
<br />
Then you should provide the mean and median of the runs, along with all the data from each run.<br />
<br />
On the topic of the Java benchmark:<br />
The Java tests you should use both the server vm and the client VM and compare results.  The 2 vms are actually very different.  The java benchmark isn't really doing much but testing the interpreter as I doubt that much of that code is actually being compiled to native code.  I think that it's fairly well know that for short running programs Java is slow ( but for long running programs it's fairly competive).  In the jave benchmark you shouldn't be using new Date().getTime() to get the time, you should instead use System.currentTimeMillis() as it is faster and doesn't involve the creation of more objects.</description>
			<pubDate>Thu, 08 Jan 2004 20:23:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Where for art thou Ruby?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I think, it would be best to wait until after 2.0... Because, Ruby is kind of little slow, not thread-safe and many others. It forced me to learn the different language, but I will come back to Ruby when the 2.0 is released. I love Ruby, it's easy and clean to me.</description>
			<pubDate>Thu, 08 Jan 2004 20:27:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Re: Java, and legal considerations</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Last of all, I'd like to draw the author's attention to the .Net framework EULAs... It is in fact a violation of the EULA to produce benchmarks of this sort of .Net against other platforms. Which is why they haven't been done all over the place by now <img src="/images/emo/smile.gif" alt=";)" /> <br />
<br />
If that is true, it's rather astonishing! &quot;BTW, if you use our product, you are forbidden to discuss its performance publicly.&quot; It sounds like they have no faith in their product <img src="/images/emo/smile.gif" alt=";)" /></description>
			<pubDate>Thu, 08 Jan 2004 20:28:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Synthetic benchmarks</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Small synthetic benchmarks are generally not representative of real programs. Typically a benchmark suite of real applications that compute real things people are interested in are the best indicator, but unfortunately it is hard to find a large enough suite implemented well in a large enough number of languages to matter.<br />
<br />
Even so, I will say this.<br />
<br />
Java is the real star of this benchmarking effort. The conventional thinking of people who say &quot;Java? Bytecode? VM? It will always be slow!&quot; is clearly in error. A huge (and I do mean huge) amount of engineering effort by thousands of smart people from all kinds of institutions has gone into designing and building high-performance virtual machines these days, and Java, through mainly SUN and IBM's efforts, has been the principal recipient of those benefits. JIT compilers are extremely advanced, far ahead in many areas than static compilers. It is no wonder that you see the performance gap rapidly closing--though it shouldn't be called a gap because the potential to also exceed static compilation is huge.<br />
<br />
The speed of the language has less and less to do with the speed of the resulting application these days. What matters most now (and it has always mattered) is smart designs and efficient algorithms. For integer and float math, the design space is small, but for an application the size of a webserver, a graphics program, a web browser, etc, the design space is huge. Even if it did break down to one language is X% slower than another (which kind of thinking is complete rubbish anyway), what does it matter?<br />
<br />
Virtual machines get better every generation. And every single program ever written for that VM--anytime, anywhere, no matter who wrote it, how it was compiled, what platform it was on--gets faster right along with it. Static compilation is static--it has long slowed its evolution and stabilized. But dynamic compilation is evolving at an amazing rate.<br />
<br />
Don't be a naysayer, be excited about what the future brings for new languages!</description>
			<pubDate>Thu, 08 Jan 2004 20:39:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>great language shootout, anyone</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Hello everybody,<br />
<br />
In case anyone is interested, there is a very interesting benchmarking site (many languages, many tests) at:<br />
<br />
<a href="http://www.bagley.org/~doug/shootout/" rel="nofollow">http://www.bagley.org/~doug/shootout/</a><br />
<br />
It doesn't include the Microsoft new CLR language/language implementations, iirc, so the tests in the articles are still interesting.<br />
<br />
It's weird to see gcc performing so badly. maybe the cygwin overhead is to blame?</description>
			<pubDate>Thu, 08 Jan 2004 20:39:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Python</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I think Python was misrepresented a bit here, since most Python programmers will either write the 'number crunching' parts of their programs as a c library or use more low level python modules such as numpy or scientific python.<br />
Serious mathematical operations in pure Python are a rarity.</description>
			<pubDate>Thu, 08 Jan 2004 20:41:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Fortran?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I would be interested to see how FORTRAN does in a similar benchmark.</description>
			<pubDate>Thu, 08 Jan 2004 20:52:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Fortran 95, Anyone?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Heck, FORTRAN 77, even.  Unfortunately, I could only do it for Linux and Tru64.  I don't have a F95 compiler for my WinXP box at home.<br />
<br />
If anyone out there is using ifort on WinXP, please try out the program.</description>
			<pubDate>Thu, 08 Jan 2004 20:52:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: jizzles (IP: ---.CS.UCLA.EDU)</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Java is the real star of this benchmarking effort. The conventional thinking of people who say &quot;Java? Bytecode? VM? It will always be slow!&quot; is clearly in error.<br />
<br />
There seems to be general agreement that Java is fast on the server-side, but most of the complaints about Java's speed relate to it's performance in desktop apps, something not tested in this benchmark.</description>
			<pubDate>Thu, 08 Jan 2004 20:53:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Fortran?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Grrr...*shakes fist at Nate*<br />
<br />
Actually, it'd be cool to see how gfortran does.  I'm sure gcc would finish a hojillion times faster, but still.</description>
			<pubDate>Thu, 08 Jan 2004 20:55:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Hmm</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Well, these benchmarks aren't really very indicative. The I/O benchmark is, well, I/O bound, which is why interpreted Python performed as fast as compiled C++. The numeric benchmarks are just that, numeric benchmarks. Numerics are really the best case for an optimizer, because they are so low level. All the JIT compilers should have compiled the loop once to native code, and gotten out of the way. This is fine if all you are doing is inner-loop numeric code (some scientific stuff, graphics) but not really a good indicator of general performance. Even for scientific code, this benchmark probably isn't representative, because you often need proper mathematical semantics for your calculations, which C/C++/Java/C# don't provide. <br />
<br />
A more telling test would be to get higher-level language features involved. Test virtual C++ function calls vs Java method calls (which are automatically virtual). Test the speed of memory allocation. Test the speed of iterators in various languages. Do an abstraction benchmark (like Stepanov for C++) to test how well the compiler optimizes-away abstraction. <br />
<br />
@Brian: I can tell you how a Common Lisp result of the same benchmark would turn out. Given proper type declarations, and a good compiler (SBCL, CMUCL), you will get arbitrarily close to C++ for this task. The compiler should generate more or less the same code. See this thread for some good numbers:<br />
<br />
<a href="http://groups.google.com/groups?hl=en&amp;lr=&amp;ie=UTF-8&amp;threadm=87n0t2365s.fsf%40ortler.iwr.uni-heidelberg.de&amp;rnum=3&amp;prev=/groups%3Fq%3Dperformance%2Bof%2Bnumerical%2Bcode%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3D87n0t2365s.fsf%2540ortler.iwr.uni-heidelberg.de%26rnum%3D3" rel="nofollow">http://groups.google.com/groups?hl=en&amp;lr=&amp;ie=UTF-8&amp;thre...</a> <br />
<br />
Note that cmucl is very competitive with gcc. Intel C++ blew both cmucl and gcc away, but that has nothing to do with the language. Intel C++ has an auto-vectorizer that will automatically generate SSE code if it finds algorithms (like the dot-prod and scale in this benchmark) that can be vectorized. GCC and CMUCL don't support his feature. <br />
<br />
Interestingly, there is evidence that Lisp performs extremely well for large programs:<br />
<br />
See this links:<br />
<a href="http://www.flownet.com/gat/papers/lisp-java.pdf" rel="nofollow">http://www.flownet.com/gat/papers/lisp-java.pdf</a><br />
<a href="http://www.norvig.com/java-lisp.html" rel="nofollow">http://www.norvig.com/java-lisp.html</a><br />
<br />
In the study, the fastest programs were C++, but the average of the Lisp programs was faster than the average of the C++ programs. The Java stats on the study are a bit outdated, because it was done with JDK 1.2.</description>
			<pubDate>Thu, 08 Jan 2004 20:57:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Please post your sources</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Ok, I am an idiot for not seeing the sources (OTOH, I would usually expect to find them at the *END* of the article)<br />
<br />
For VB's file routines, it is no wonder they are so slow. You are, as I suspected, using the VB file routines. Just to give you an idea, here is what happens EVER TIME you call PrintLine:<br />
<br />
1) An object [1] array is created (PrintLine takes a param array). This requires an allocation, and then requires copying to the array. Given the number of items you write, you will trigger quite a few GCs<br />
<br />
2) The VB runtime must walk the stack to find out what assembly you are calling from. This requires quite a bit of reflection, and involves acquiring a few locks. This is done to prevent conflicts between assemblies.<br />
<br />
3) The VB runtime must find which filestream is refered to by the specified handle<br />
<br />
4) Stream.WriteLine is called.<br />
<br />
Well, its no small wonder it is so slow... Something similar may be happening for J#.NET<br />
<br />
I would suggest you consider rewriting the VB file IO routines, and resubmitting your data.<br />
<br />
As well, you should be aware that you are putting C++/C at a HUGE advantage in the IO tests. In the read portion of the test, you do the following in <br />
while (i++ &lt; ioMax) {<br />
    myLine = streamReader.ReadLine();<br />
}<br />
<br />
While in C you do:<br />
<br />
char readLine[100];<br />
stream = fopen(&quot;C:\TestGcc.txt&quot;, &quot;r&quot;);<br />
i = 0;<br />
while (i++ &lt; ioMax)<br />
{<br />
	fgets(readLine, 100, stream);<br />
}<br />
<br />
This is very much unfair to the C# language. You are forcing it to allocate a new buffer for every line that is read. C is not forced to allocate the new array, which saves it alot of time. If you would like to make the test fair, please use the StreamReader.ReadChars method to read to a char [] buffer. This will prevent the repeated allocations, which should make the test more fair. A similar technique should be used for the other languages.<br />
<br />
Really, you should have posted these items for review before  claiming that you had a fair benchmark. Really, the article should have been split into two postings, the first two sections in one, and then after commenting, the third. I would also encourge OSNews to not post benchmarks that have not obtained peer review.</description>
			<pubDate>Thu, 08 Jan 2004 21:09:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Lots of other bottlenecks</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>So, Rayiner has is right. These benchmarks are mostly testing parts of the operating system, not necessarly the runtimes all that much. That's why the I/O scores are all so close. The only anomaly here is that Java is probably using strict IEEE arithmetic for the trig stuff, which is why it's so slow. I think another poster mentioned how to turn that off.<br />
<br />
It's these kinds of benchmarks that I get nervous about when people start saying &quot;Java is just as fast as C.&quot; Well, I'm a Java programmer, and I love the language, and it really has gotten a LOT faster over the last few years, but there are some things in Java that are just inherently difficult to optimize away. I'm talking about things like array bounds checking, every data structure being a reference to an object, GC, and all data types being signed (try working a lot with byte values in Java and see how much ANDing you end up doing to combat sign extension issues). These structural choices in the language design cause extra overhead that C programs just don't suffer. Now, those are also some of Java's greatest strengths in terms of making programming safer, but they do have a price. Fancy VMs can reduce that price, sometimes to zero for certain sections of code (the latest Hotspot does an excellent job getting rid of array bounds checking in many instances), but it's asymtotic.<br />
<br />
Now, here's what I think: for most types of programs, C or Java are just fine, particularly given today's fast CPUs and spacious memory supplies. Both of those favor Java and tend to make the difference small for anything real-world. Even the purely interpreted languages like Perl or Python are fine for all but the heaviest workloads.</description>
			<pubDate>Thu, 08 Jan 2004 21:15:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Why is it that when languages are compared ...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>... people never include Delphi in any benchmarks? It's always C, C++, Java etc ... but I never see any of these benchmarks with Delphi included. <img src="/images/emo/sad.gif" alt=";)" /></description>
			<pubDate>Thu, 08 Jan 2004 21:38:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>gcc optimizations...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I believe that -fomit-frame-pointer is not enabled at any optimization, therefore it's curious that it's specifically enabled for Visual C++, but not for gnu.  Also, there's the potential that better performance would result from -O2, and then selectively optimizing from there, rather than going all the way to -O3.</description>
			<pubDate>Thu, 08 Jan 2004 21:42:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title> RE: Please post your sources</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Someone said that python guys would've used C libraries or they would've written their own c routines, if that is true, maybe in Java I would used JNI or in VB I would called a C DLL or I would even used assembler methods in C (not sure if any of those methods are faster, just making my point).<br />
This guy just showed results from code that many people who are not experts in a specific programming language would've code.  And one must recognize that kind of code is awfuly common,  So I think this benchmark is valid, in certain environments and cases.   It is up to reader to be clever enough to understand that.</description>
			<pubDate>Thu, 08 Jan 2004 21:43:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Python interpreted?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&gt;&gt;Python is interpreted and it wasn't left out. <br />
<br />
&gt;Actually... if you read the posting, he compiled the &gt;python code with Psyco. Also python is compiled into byte &gt;code at runtime for fast execution too. Perl does not &gt;behave like this nor can you compile it. So my commet &gt;remains. <br />
<br />
&gt;Mike<br />
<br />
But he also tried straight uncompiled python. I thought Perl was intepreted like Python?</description>
			<pubDate>Thu, 08 Jan 2004 21:43:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>where is this site where all the languages are compared ?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Hello,<br />
some years ago I've found a site whith a collection of identical bench for every progamming language, one for forth, one for c, one for c++...<br />
the results were organised in a chart viewing all the spec, the machine, the system, the compiler...<br />
<br />
I wanted to send the url to this guy but I'm not able to find it again....<br />
<br />
(there'were some for perl and prolog for example)<br />
<br />
if someone could send me the url, it would be nice<br />
<br />
<br />
<br />
<br />
Cheers,<br />
<br />
Djamé</description>
			<pubDate>Thu, 08 Jan 2004 21:45:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Who cares?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&gt;Last of all, I'd like to draw the author's attention to &gt;the .Net framework EULAs... It is in fact a violation of &gt;the EULA to produce benchmarks of this sort of .Net &gt;against other platforms. Which is why they haven't been &gt;done all over the place by now <img src="/images/emo/smile.gif" alt=";)" /> <br />
<br />
Who cares, the worst they can do is send a letter to the author to stop by which time the benchmarks are out. After that someone else can take over, etc.</description>
			<pubDate>Thu, 08 Jan 2004 21:48:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Linux buddy</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I'm talking about things like array bounds checking, every data structure being a reference to an object, GC<br />
----------<br />
These three are not necessarily that bad. Analysis shows that most bound checks can be eliminated ahead of time. I'm sure the Java compiler does this optimization. On the other hand, every data structure being a reference is something that is slow in Java, but doesn't need to be. <br />
<br />
You see, the primitive/class distinction in Java is largely unnecessary. It is entirely possible for a powerful compiler to determine what should be boxed and what should not. Powerful CL/Scheme/Dylan/ML/Smalltalk compilers do such analysis. So in these languages, there are no primitive types. Everything seems to be a full object on the heap. The compiler will take care of doing things like stack-allocating variables when no references to it escape the function, or unbox an object when it can be determined that it is safe to do so.</description>
			<pubDate>Thu, 08 Jan 2004 21:55:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>VB Code not well writen</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>It would seem that the vb code DOES not use filestream for the file IO like C#. But that he was using the old method of file manipulation which would be alot slower. Try using a System.IO.File and a System.IO.StreamReader the performance will be closer to that of C#.</description>
			<pubDate>Thu, 08 Jan 2004 21:55:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Good Job!</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Good Job, interesting results.<br />
But, as someone else said, on these small programs,<br />
I'm not sure the Java HotSpot compiler/profiler even kicked in.  I think the Java JIT only profiles and compiles after it's sure the job isn't going to end soon?</description>
			<pubDate>Thu, 08 Jan 2004 21:55:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Python &amp;amp; Numeric</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Interesting article Christopher! It was quite informative to see MS VC++ at the top of the speed marks, and also interesting to see the file IO in Python didn't seem to show much significant difference with many of the other languages.<br />
<br />
So, I'll be the one to mention it: would it be possible to provide a benchmark for Python using the Numeric/NumArray libraries? These were written specifically for numerical operations (the benchmarks you used were bread and butter to Numeric), and they do provide a speed boost. I should imagine that the results still wouldn't approach the fastest languages here, but it would probably improve the performance, possibly even faster than the Psyco compiled Python.<br />
<br />
Or maybe you should include some Fortran/Forth too? (nag! nag!) <img src="/images/emo/wink.gif" alt=";)" /></description>
			<pubDate>Thu, 08 Jan 2004 21:56:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>@djame</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>You're looking for Doug's Great Computer Language Shootout<br />
<br />
<a href="http://www.bagley.org/~doug/shootout/" rel="nofollow">http://www.bagley.org/~doug/shootout/</a><br />
<br />
Its a bit outdated, and some of the code isn't well-written (I know a lot of people on c.l.lisp complained about sub-optimal CL code) but its overall pretty good.</description>
			<pubDate>Thu, 08 Jan 2004 21:58:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Language comparison</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I would actually be more interested in how many lines/characters of code he has to write to achieve in each language. Then let a third party read the code, and say which one was more &quot;readable&quot;.</description>
			<pubDate>Thu, 08 Jan 2004 22:00:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Please post your sources</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Rambus,<br />
<br />
Your assertion that &quot;This guy just showed results from code that many people who are not experts in a specific programming language would've code. And one must recognize that kind of code is awfuly common, So I think this benchmark is valid, in certain environments and cases. It is up to reader to be clever enough to understand that&quot; is incorrect.<br />
<br />
When you compare one language against another, it is not fair to take effort to optimize one language (like C) and not take time to optimize another (VB).<br />
<br />
However, the real issue is this: the author is attempting to compare how the IO in C# stacks up to the IO in VB (in the IO test). He ended up, on the other hand, comparing how fast reflection is! A benchmark should generally be optimized as much as possible. Benchmarks are meant to stimulate real life, high expense computations. In such a situation, people do not just write `common code'. They profile code, make it faster, and profile some more. This benchmark is not representative of such a situation, and thus is not valid for its intended purpose.</description>
			<pubDate>Thu, 08 Jan 2004 22:01:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>language comparison</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Here is the output of wc -l on his code. Although it is pretty useless IMO, it would be more interesting on a more complex program with +100 classes. <br />
<br />
Benchmark.py 160<br />
Benchmark.c 180<br />
Benchmark.cpp 181<br />
Benchmark.vb 186<br />
Benchmark.java 211<br />
Benchmark.jsl 212<br />
Benchmark.cs 215</description>
			<pubDate>Thu, 08 Jan 2004 22:09:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Author's early response</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I appreciate all the comments--keep them coming! I'll try to write up a response to the major (or recurring) points later tonight. -- Chris</description>
			<pubDate>Thu, 08 Jan 2004 22:26:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>cool</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I would really like to see Watcom C, Intel C and Perl added.<br />
Also the thing about IBM's JDK and Kaffe would be very interesting. Maybe (GNU) Ada could also be added. I think GCJ would have support for basic math, could be very interesting also! I would really like to see more!</description>
			<pubDate>Thu, 08 Jan 2004 22:30:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Kasper</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description><i>The c++ compiler compiles its code before it is run, and Java while it is being run. In other words, Java actually knows more about how the code is used, which in theory should let it reach better performance than c++. In real life though, its just recently (the last couple of years) that Java has actually approached (and in some cases passed) c++.</i><br />
<br />
And again, in performance critical code (for which you probably wouldn't be implementing in Java in the first place) you can always compile your C/C++ code using profile guided optimizations, which allow a process to be run and a report generated at run-time of how the code could be better optimized, at which point the code can be fed through the compiler again.  Depending on how long it takes your codebase to compile (obviously it will be quite a pain of that's in the several hour range), this really is a trivial process, especially before the final gold master release of a particular piece of software.<br />
<br />
The only cases where Java consistently outperforms native code compiled with profile guided optimizations (which allow for runtime optimization of compiled languages) are cases where a large number of virtual methods are used in C++ code.  Java can inline virtual methods at run-time, whereas in C++ a vptr table lookup is incurred at the invocation of any virtual method.<br />
<br />
Of course, the poor performance of virtual methods is usually pounded into the heads of C++ programmers during introductory classes (at least it was for me).  If you are using virtual methods inside loops with large numbers of iterations, you are doing something wrong.  In such cases, reimplementing with templates will solve the performance issues.</description>
			<pubDate>Thu, 08 Jan 2004 22:35:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>AMD vs Intel</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I would also really like to see all the same programs run on a AMD CPU (not to see if AMD beats Intel), but to see how each compiler generates code, which is generally efficient or just on one CPU.</description>
			<pubDate>Thu, 08 Jan 2004 22:35:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Raynier and LinuxBuddy</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>@Raynier<br />
You see, the primitive/class distinction in Java is largely unnecessary. It is entirely possible for a powerful compiler to determine what should be boxed and what should not. Powerful CL/Scheme/Dylan/ML/Smalltalk compilers do such analysis. So in these languages, there are no primitive types. Everything seems to be a full object on the heap. The compiler will take care of doing things like stack-allocating variables when no references to it escape the function, or unbox an object when it can be determined that it is safe to do so.<br />
<br />
You can add C# into that mix too.<br />
<br />
@LinuxBuddy<br />
One of my biggest pet peeves about java has always been no unsigned.  It might not seem like a big deal to a lot of people but for what I was doing, I ended up doing a lot bit-masking to get things done, as you stated. C# has unsigneds.  C# also has the auto-boxing as Raynier mentioned.<br />
<br />
<br />
I would like to see comparison between MS c# and Java(I guess you could add Mono and Pnet into the mix too) to see how well they optimize out bounds checking and also see what  kind of a performance hit each takes from it.</description>
			<pubDate>Thu, 08 Jan 2004 22:39:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Results on iBook G4 800MHz</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I compiled the C and C++ benchmarks on an iBook G4 800MHz. I used the best possible optimization. I edited out the IO test because it was giving me a &quot;Bus error&quot; after creating a 70Mb file. Weird.<br />
<br />
C (gcc -fast -mcpu=7450 -o Benchmark Benchmark.c)<br />
Integer: 8.8s<br />
Double: 17.2s<br />
Long: 56.2s<br />
Trig: 12.0s<br />
<br />
C++ (g++ -fast -mcpu=7450 -o BenchmarkCPP Benchmark.cpp)<br />
Integer: 8.7s<br />
Double: 16.9s<br />
Long: N/A<br />
Trig: 12.0s<br />
(I wag getting a &quot;integer constant is too large for &quot;long&quot; type&quot; warning, so I left it out)<br />
<br />
I didn't have the patience to wait for the Python program to complete.</description>
			<pubDate>Thu, 08 Jan 2004 22:53:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Rayiner Hashem</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description><i>Numerics are really the best case for an optimizer, because they are so low level. All the JIT compilers should have compiled the loop once to native code, and gotten out of the way. This is fine if all you are doing is inner-loop numeric code (some scientific stuff, graphics) but not really a good indicator of general performance.</i><br />
<br />
Yes, this benchmark could really give people the wrong idea about Java.  Obviously HotSpot is doing its job, and it performs comparable to native code.<br />
<br />
<i>Even for scientific code, this benchmark probably isn't representative, because you often need proper mathematical semantics for your calculations, which C/C++/Java/C# don't provide.</i><br />
<br />
Fortran is a wonderful language for the scientific community, not only for its language semantics but also its optimization potential.  While this potential is not fully realized on most platforms (the Alpha is the only ISA where the Fortran compiler has been optimized to the point that for scientific computing Fortran is the clear performance winner over C) Fortran does have a distinct advantage in that many mathematical operations which work as library functions in languages like C (i.e. exponents, imaginary numbers) are part of the language syntax in Fortran, and thus complex mathematical expressions involving things like exponents can be highly optimized, as opposed to C where a function invocation is required to perform exponentation.  Algorithms for doing things like modular exponents can be applied to cases where they are found in the language syntax and be applied to the code at compile time, whereas C requires programmers to implement these sort of optimizations themselves.  With more and more processors getting vector units, a language which allows such units to be used effectively really is in order.<br />
<br />
Java really dropped the ball on mathematical code.  C at least has a rationale behind why things like exp() and log() are functions rather than part of the language syntax.  C is designed to be a language with a relatively simple mapping between language syntax and processor features.  Java/.NET could have made exponentation a language feature rather than a library function... after all, they certainly aren't bound by the limitations of processors.   Instead we find these sorts of things in java.lang.Math and System.Math because they are clinging to C/C++'s legacy rather than thinking about the rationale behind the C language syntax and how the syntax could be better designed when a simple mapping between processor features and language syntax isn't required.<br />
<br />
Lack of operator overloading is the biggest drawback to mathetmatical code in Java.  Complex mathematical expressions, which are hard enough to read with conventional syntax, become completely indecipherable when method calls are used in their stead.  I had the unfortunate expreience of working on a Java application to process the output of our atmospheric model, which is an experience I would never like to repeat.  Working with a number of former Fortran programmers, everyone grew quickly disgusted with the difficulty of analyzing matrix math as method calls, and were quite amazed when I told them that with C++ operator overloading such code could be written with conventional mathematical syntax (although there are some issues differentiating dot products from cross products, but it's still much less ugly than method invocations)<br />
<br />
<i>A more telling test would be to get higher-level language features involved. Test virtual C++ function calls vs Java method calls (which are automatically virtual).</i><br />
<br />
Java will almost certainly win on the speed of virtual methods because it can inline them at run-time.  Again, the solution in C++ is not to use virtual methods within performace critical portions of the code, especially within large loops, and the simple solution is to replace such uses with templates where applicable.</description>
			<pubDate>Thu, 08 Jan 2004 22:59:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>C++ ???</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>His C++ is straight C. Iy even uses printf instead of cout... Where are the classes? Where is the standard c++ library usage??<br />
<br />
Hmmm....</description>
			<pubDate>Thu, 08 Jan 2004 23:00:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: RoyBatty</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description><i>One of my biggest pet peeves about java has always been no unsigned. It might not seem like a big deal to a lot of people but for what I was doing, I ended up doing a lot bit-masking to get things done, as you stated. C# has unsigneds.</i><br />
<br />
Agreed.  One of the first things I ever wrote in Java (about 9 years ago) was an implementation of IDEA, and I quickly learned why lack of unsigned types was a bad thing.  I ended up using signed 32-bit integers to emulate unsigned 16-bit integers, and of course this was done in conjunction with a great deal of masking.  This revealed to me one of the many hacks which were thrown into the Java syntax, the unsigned shift operator &gt;&gt;&gt;.  Sun, wouldn't it have been simpler to support unsigned types?</description>
			<pubDate>Thu, 08 Jan 2004 23:03:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>@Roy Batty</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I don't know if auto-boxing is really the same thing. If it is, then why are there structs in C#? And why is there a distinction between allocating a struct on the heap vs the stack? It might be, but I'm not familiar enough with C# to make the comparison. <br />
<br />
Of course, C#'s compiler might have such analysis. Microsoft has some smart compiler guys. They're not very innovative, but they've got their fingers in some nifty pies. But I hear C# 2.0 will get lambdas with proper closures! At that point, it would be cool to do a benchmark to see how good their closure-elimination optimizations are compared to CL/ML compilers. Is type-inference too much to ask for in C# 3.0 <img src="/images/emo/smile.gif" alt=";)" /></description>
			<pubDate>Thu, 08 Jan 2004 23:05:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Trig tests</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I think there are a couple of issues surrounding the trig tests in the benchmark.<br />
<br />
The first is obvious: all of the computational &quot;heavy lifting&quot; is being done by the run-time library.  Performance differences in the code you actually wrote are likely to be unimportant.<br />
<br />
The second is that results like this are almost meaningless unless they are accompanied by some measure of the accuracy of the result.  Without going into the gory details, functions like sine and cosine are typically calculated from power series approximations.  Taking fewer terms is faster, but less accurate.  For example, I can write a very fast C routine to approximate the value of pi:<br />
<br />
     double pi() {<br />
        return 3.0 ;<br />
      }<br />
<br />
The result is correct to one significant figure, after all.  ;-)<br />
<br />
(Numerical accuracy is not just a theoretical concern.  Early versions of Lotus 1-2-3 implemented calculation of standard deviation wrong, and consequently got the wrong answer for the set of numbers {999999, 1000000, 1000001}.)</description>
			<pubDate>Thu, 08 Jan 2004 23:06:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Forth?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Forth is a powerful and expecialy, very fast compiled programming language, too often forgotten.</description>
			<pubDate>Thu, 08 Jan 2004 23:07:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>@Bascule</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>With more and more processors getting vector units, a language which allows such units to be used effectively really is in order. <br />
--------<br />
APL anyone?<br />
<br />
In addition to the advantages of Fortran you mentioned, I was also thinking about a full numeric tower like some languages have. Standard machine integers and floats are nice for a lot of scientific computing (and accounting, as I'm told), but for some computations, you need things like infinite precision rationals, arbitrary precision integers, etc.</description>
			<pubDate>Thu, 08 Jan 2004 23:12:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>ocaml?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I bet ocaml would kick all their asses.  <img src="/images/emo/smile.gif" alt=";)" /></description>
			<pubDate>Thu, 08 Jan 2004 23:19:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>flawed</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Comparing only arithmetic/math operations is far from being representative of the performancec of any language. What about the other instructions found in languages such as tests or assignations, real memory allocations, object manipulation, GUI, file system and network access, etc, etc.<br />
<br />
Plus we all know that GCC by default generates a terrible code on Intel. It generates a very clean (and makes good use of the x86 instruction set) only in optimised mode, which was not used for the benchmark.<br />
<br />
This benchmark could lead one to think that Java is just 2 times slower than C/C++. Something that anyone who has used a large application written in Java will know can't be exact.<br />
<br />
This benchmark has a very limited scope and its results are not representative of the real world.</description>
			<pubDate>Thu, 08 Jan 2004 23:24:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>VB IO Code could be improved...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>The following code:<br />
<br />
FileOpen(1, fileName, Microsoft.VisualBasic.OpenMode.Output)<br />
Do While (i &lt; ioMax)<br />
  PrintLine(1, myString)<br />
  i += 1<br />
Loop<br />
FileClose(1)<br />
<br />
could be much improved by using the native .NET methods.  In fact, the code should be identical to that of C#.<br />
In addition, the C# IO code is using try..catch construct that could slow the code down.  It would be good to retest the code using these suggestions.</description>
			<pubDate>Thu, 08 Jan 2004 23:32:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Athlon benchmarks, gcc 3.3 vs icc 8.0 (with/without profile guided optimization)</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>You can grab the binaries I made here:<br />
<br />
<a href="http://fails.org/benchmark/" rel="nofollow">http://fails.org/benchmark/</a><br />
<br />
These are optimized for Athlon XP/MP and will require SSE<br />
<br />
b-gcc is compiled with gcc 3.3 with -O3 -march=athlon -msse<br />
b-icc is compiled with icc 8.0 with -tpp6 -xiMK -O3<br />
<br />
b-icc-opt has been optimized with Profile Guided Optimization.  First, Benchmark.c was compiled with -prof_gen to create an &quot;instrument&quot; executable.  Next, the instrument executable was executed, and a run-time profile was generated (in the form of a .dyn file).  Finally, b-icc-opt itself was compiled with -prof_use -tpp6 -xiMK -O3.<br />
<br />
Respective scores when executed on a dual Athlon  MP 2.0GHz:<br />
<br />
<b>gcc 3.3:</b><br />
Int arithmetic elapsed time: 6550 ms<br />
Double arithmetic elapsed time: 6250 ms<br />
Long arithmetic elapsed time: 16760 ms<br />
Trig elapsed time: 3640 ms<br />
I/O elapsed time: 1090 ms<br />
Total elapsed time: 34290 ms<br />
<br />
<b>icc 8.0:</b><br />
Int arithmetic elapsed time: 6740 ms<br />
Double arithmetic elapsed time: 5560 ms<br />
Long arithmetic elapsed time: 27140 ms<br />
Trig elapsed time: 2510 ms<br />
I/O elapsed time: 1230 ms<br />
Total elapsed time: 43180 ms<br />
<br />
<b>icc 8.0 (with profile guided optimization):</b><br />
Int arithmetic elapsed time: 6340 ms<br />
Double arithmetic elapsed time: 5540 ms<br />
Long arithmetic elapsed time: 27460 ms<br />
Trig elapsed time: 2430 ms<br />
I/O elapsed time: 1190 ms<br />
Total elapsed time: 42960 ms<br />
<br />
Ouch!  Clearly icc has trouble with 64-bit math.  But otherwise, icc clearly outperforms gcc 3.3 in all other respects being tested, definitively when profile guided optimization is used.</description>
			<pubDate>Thu, 08 Jan 2004 23:42:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Perl</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>If I recall correctly, the Camal book says that Perl is also byte compiled internally before execution, like Python (and even Tcl nowadays) Benchmarks usually show Perl being a bit faster than Python, though I don't know if Perl has an equivalent of Psycho. (The Python native compiler used in the benchmark.)</description>
			<pubDate>Thu, 08 Jan 2004 23:43:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Some results...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>The C benchmark compiled -O2 on AthlonXP 1.4ghz. Fedora core1.<br />
gcc version 3.3.2<br />
gcc -o2 Benchmark.c<br />
<br />
Int arithmetic elapsed time: 8330 ms<br />
Double arithmetic elapsed time: 7850 ms<br />
Long arithmetic elapsed time: 20810 ms<br />
I/O elapsed time: 21750 ms<br />
<br />
(I could not get the trig benchmark working, so left it out)<br />
<br />
It's interesting how much faster the int, double and long benchmarks are than his results.... Though the can really crunch those numbers compared to Pentium 4M 2GHz. I/O is slower.<br />
<br />
Compiled with -O3 it gets slightly slower!<br />
<br />
Int arithmetic elapsed time: 8320 ms <br />
Double arithmetic elapsed time: 7860 ms<br />
Long arithmetic elapsed time: 20840 ms<br />
I/O elapsed time: 21850 ms<br />
<br />
Could these better results be due to running gcc on native Linux, or is it the different processor?</description>
			<pubDate>Thu, 08 Jan 2004 23:51:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>@Raynier</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Structs and primitives are value types and allocated on the stack, but they are also objects too.  The compiler automatically creates an object if needed instead of you having to do it.  The main benefit, obviously, you only pay for what you use. I thought you were referring to the way in java that you have to use wrapper classes for the primitives.  Java, obviously, doesn't have structs.  Classes are always on the heap in C#</description>
			<pubDate>Fri, 09 Jan 2004 00:07:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Java results for the same system as the gcc/icc ones</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Tested using J2SE v 1.4.2_03 on a dual Athlon MP 2.0GHz running Linux 2.6.0.<br />
<br />
The code was compiled with javac -g:none and executed with java -server:<br />
<br />
Int arithmetic elapsed time: 7271 ms<br />
Double arithmetic elapsed time: 11501 ms<br />
Long arithmetic elapsed time: 23017 ms<br />
Trig elapsed time: 77649 ms<br />
IO elapsed time: 3418 ms<br />
Total Java benchmark time: 122856 ms<br />
<br />
Well, Java trumps icc on 64-bit math, but thoroughly loses everywhere else, especially the floating point and trig benchmarks.</description>
			<pubDate>Fri, 09 Jan 2004 00:15:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Hong Zhang (IP: ---.SNVACAID.covad.net) - Posted on 2004-01-08 20:04:14</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>The default math library is compiled with -O0 to preserve strict IEEE semantics. In fact, with minor change to the source code, -O2 will work as well. Java has two math libs, Math and StrictMath. They are default to the same implementation. But JVM is allowed to use faster/less accurate version of Math. The VC++ uses loose math (x86 trig instructions directly).<br />
<br />
I assume you're refering to floating point precision, Java by default follows the IEE 754 international specification, however, java has also allowed for EXTENDED PRECISION on platforms that support it.<br />
<br />
I assume when you mean &quot;faster/less accurate version of Math&quot;, I assume you are refering to the standard library that is used.</description>
			<pubDate>Fri, 09 Jan 2004 00:24:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>@Roy Batty</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Ah, I see. In Lisp/etc, there is no distinction stack-allocated primitive types and heap-allocated classes. The compiler will automatically determine where to allocate the object to maximize performance. Also, the compiler doesn't box/unbox primitives at runtime, but decides at compile-time what objects should be boxed and which should be unboxed.</description>
			<pubDate>Fri, 09 Jan 2004 00:38:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Linux results GCC 3.3.2 Athlon XP 2400</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>gcc -lm -O2 Benchmark.c<br />
Int arithmetic elapsed time: 6240 ms<br />
Double arithmetic elapsed time: 5920 ms<br />
Long arithmetic elapsed time: 16370 ms<br />
Trig elapsed time: 3370 ms<br />
I/O elapsed time: 890 ms<br />
<br />
Total elapsed time: 32790 ms<br />
<br />
 gcc -lm -O0 Benchmark.c<br />
Int arithmetic elapsed time: 8780 ms<br />
Double arithmetic elapsed time: 9470 ms<br />
Long arithmetic elapsed time: 18920 ms<br />
Trig elapsed time: 3650 ms<br />
<br />
Total elapsed time: 41930 ms<br />
<br />
Looks like Cygwin is a lot slower.</description>
			<pubDate>Fri, 09 Jan 2004 00:43:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Profiling the Profiled code</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I only wish. I've been on three large C++ version 6 project.<br />
( 100 to 300 classes ).  The VC++ compiler generated broken release code.  We shipped the &quot;Debug build&quot;.<br />
<br />
Could not convince product manager to buy better tools or allocate any time to find the problem.  Many memory leaks were from Microsoft's MFC classes.<br />
<br />
My point is, Java code profiling on the fly, is the better solution.<br />
Mostly because 99% of the programmer's out there will never get the chance to profile their code, if they even know how to do it. Manger's won't spend the time or money.</description>
			<pubDate>Fri, 09 Jan 2004 00:45:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Linux results GCJ 3.3.2 Athlon XP 2400 (Java)</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>gcj-3.3 -O2 --main=Benchmark Benchmark.java<br />
Int arithmetic elapsed time: 6220 ms<br />
Double arithmetic elapsed time: 5914 ms<br />
Long arithmetic elapsed time: 16485 ms<br />
Trig elapsed time: 26012 ms<br />
IO elapsed time: 10229 ms<br />
<br />
Int, Double and Long at the same speed of GCC, io en trig a lot slower than GCC.</description>
			<pubDate>Fri, 09 Jan 2004 01:01:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>For those who care...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I've compiled my results into a more easy to interpret format, and drawn some different conclusions than I posted here:<br />
<br />
<a href="http://fails.org/benchmarks.html" rel="nofollow">http://fails.org/benchmarks.html</a><br />
<br />
In reply to MikeDreamingofabetterDay...<br />
<br />
<i>My point is, Java code profiling on the fly, is the better solution.</i><br />
<br />
The primary drawback of Java's run-time profiling is that all optimizations are discarded when the application exits.   Profiling really helps optimize code which spends most of its time executing in a small number of places within the executable.  Consequently, large applications which do an elaborate amount of startup processing take an additional performance hit from run-time optimization in that the startup code will only be touched once, but the run-time's optimization code still attempts to determine how best to optimize.  Eclipse and NetBeans certainly come to mind... their start-up times are an order of magnitude worse than any others IDEs I've used.<br />
<br />
Profile guided optimization, on the other hand, is a one-time process, and the optimizations are permanent to the binary, thus no performance loss is incurred.<br />
<br />
<i>Mostly because 99% of the programmer's out there will never get the chance to profile their code, if they even know how to do it.</i><br />
<br />
Profiling should be (and often is) an additional automated function of the unit testing process.  Intel's icc can take a number of profiles from a number of different test runs and compile the collective results (a separate .dyn file is generated for each run of the instrument executable) to determine the best way to optimize the given module when a release build is performed.<br />
<br />
I've never used Microsoft Visual C++ on a large project, but your woes there are not really pertainent to the use of profile guided optimization.</description>
			<pubDate>Fri, 09 Jan 2004 01:14:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Object Performance</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Object Oriented performance is really important with oo languages. Creating and destroying objects. casting and stuff like that..</description>
			<pubDate>Fri, 09 Jan 2004 01:15:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>@Bascule</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Your tests are indeed interesting, but what I think is the main point is, Java, generally speaking, doesn't lag behind significantly! We're not talking orders of magnitude here, it's the same ballpark!</description>
			<pubDate>Fri, 09 Jan 2004 01:18:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>On boxing/unboxing in Java</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>@Rayiner<br />
@RoyBatty<br />
<br />
On boxing/unboxing in Java, yes, you are right that this can be certainly be done. I belive the JDK 1.5 Hotspot is going to be doing this at some level. As I said, it isn't the case that Java can't go faster with better optimizations, just that such optimizations have to be done, thus adding to the complexity of the runtime.<br />
<br />
These are language-level, structural issues that C just doesn't have to deal with. C's simple, &quot;assembler with loops&quot; sort of orientation is both a blessing and a curse. It's a blessing when it comes to optimization as you don't have these sorts of constraints to deal with, and frankly, the language leaves lots of implementation-dependent behavior to exploit. Java is more constrained, which eliminates broad classes of bugs that are very difficult to debug, but in return, the language exacts an overhead which the JVM compilers all seek to reduce to near-zero. Put another way, it's a lot easier to write a passable C compiler than a passable Java VM (though very difficult to write sophisticated versions of either).<br />
<br />
Again, I love Java. It's my main programming language. I love its relatively small and simple language design with resemblance C (probably my next favorite language). With CPU speeds increasing and Java JVMs just getting better and better, I find myself programming almost exclusively in Java now.</description>
			<pubDate>Fri, 09 Jan 2004 01:19:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Linux results MCS 0.26 Athlon XP 2400 (Mono)</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>mcs Benchmark.cs<br />
<br />
Int arithmetic elapsed time: 9955 ms<br />
Double arithmetic elapsed time: 21385 ms<br />
Long arithmetic elapsed time: 55066 ms	<br />
Trig elapsed time: 3707 ms<br />
IO elapsed time: 20949 ms<br />
<br />
Total C# benchmark time: 115636 ms</description>
			<pubDate>Fri, 09 Jan 2004 01:21:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>@Bascule</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&quot;Agreed. One of the first things I ever wrote in Java (about 9 years ago) was an implementation of IDEA, and I quickly learned why lack of unsigned types was a bad thing. I ended up using signed 32-bit integers to emulate unsigned 16-bit integers....&quot;<br />
<br />
Characters are unsigned 16 bit quantities. They are the only unsigned types in Java. Why didn't you use them?</description>
			<pubDate>Fri, 09 Jan 2004 01:24:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>@Bascule</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Java really dropped the ball on mathematical code. C at least has a rationale behind why things like exp() and log() are functions rather than part of the language syntax. C is designed to be a language with a relatively simple mapping between language syntax and processor features. Java/.NET could have made exponentation a language feature rather than a library function... after all, they certainly aren't bound by the limitations of processors. Instead we find these sorts of things in java.lang.Math and System.Math because they are clinging to C/C++'s legacy rather than thinking about the rationale behind the C language syntax and how the syntax could be better designed when a simple mapping between processor features and language syntax isn't required.<br />
<br />
<br />
You're right from a syntax perspective, but there is no reason that speed has to suffer. A given JVM may optimize various library calls to inlined, optimal instruction sequences. This is done in some JVMs for basic java.lang classes (like String handling, etc.). Your point about not having inline operators that make your code readable is very true, however.</description>
			<pubDate>Fri, 09 Jan 2004 01:27:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>visual c++ on windows is fast</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Visual c++ is fast on windows - is that surprizing ?<br />
<br />
I just hope that people will not conclude that gcc is slow in general - gcc is a lot faster on Linux : for example the benchmark for c (amd1800+, linux, gcc3.3.1mdk) took a total of 54ms (41ms with -O2 -march=athlon-xp).</description>
			<pubDate>Fri, 09 Jan 2004 01:29:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>@Rayiner</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Ah, I see. In Lisp/etc, there is no distinction stack-allocated primitive types and heap-allocated classes. The compiler will automatically determine where to allocate the object to maximize performance. Also, the compiler doesn't box/unbox primitives at runtime, but decides at compile-time what objects should be boxed and which should be unboxed.<br />
<br />
Right. In most every Lisp implementation, every value travels along with its type. Typically, a few of the low-order bits are used to encode the type. There is no real distinction between &quot;primitive type&quot; versus other types when it comes to function calls, etc.</description>
			<pubDate>Fri, 09 Jan 2004 01:33:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Platform matters too</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Hotspot is heavily optimized for Solaris-sparc, being Sun's flagship platform and all. GCC is targetted towards x86 mostly (although I will stop short of saying it is heavily optimized, because honestly, it isn't).<br />
<br />
Compare the same benchmarks on a Solaris-sparc system, especially a large-scale system, and you might find some very interesting results.</description>
			<pubDate>Fri, 09 Jan 2004 01:33:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>@LinuxBuddy</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Right. In most every Lisp implementation, every value travels along with its type. Typically, a few of the low-order bits are used to encode the type.<br />
--------------<br />
This isn't necessarily correct. In the general case, every object has a header describing its type, just like Java/C# classes. However, there are a number of optimizations to this general case.<br />
<br />
- Some implementations store certain special types (integers, cons cells, etc) right in the pointer word, with some bits reserved as a type tag. <br />
<br />
- Some implementations don't bother with tag bits, and instead use an analysis that determines when an object doesn't need to be a full object. For example, when you use an integer as a loop counter, you can just use a regular (untagged) machine word. <br />
<br />
- Some implementations support type specialization, and generate type-specialized versions of functions, like C++ templates do. <br />
<br />
Thus, even though the programmer always deals with objects, the generated machine code will often deal directly with machine types. So its not strictly true that every value travels with its type. For the numeric benchmarks in these articles, for example, the machine code would would deal with regular floats.</description>
			<pubDate>Fri, 09 Jan 2004 01:56:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>for those interested (benchmarking)</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I have put on line the famous unixbench from the magazine byte :<br />
you have to tweak the makefile in order to get the best optimisation. For myself : I put that :<br />
<br />
OPTON = -O3 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math <br />
	 -march=i686 -mcpu=i686 -pipe -malign-loops=2 -malign-jumps=2 -malign-functions=2<br />
<br />
it can be found at <a href="http://www.loria.fr/~seddah/bench.tar.gz" rel="nofollow">http://www.loria.fr/~seddah/bench.tar.gz</a><br />
<br />
I know this is a bit off-topics but I would like to see results from various system, I will put mine in this forum for a celeron 450 running mandrake 8.0 and for a powerbook (old one) running linuxppc2K.....<br />
if someone could make this bench run under mac os X, it would be great<br />
<br />
<br />
<br />
Cheers<br />
<br />
Djamé</description>
			<pubDate>Fri, 09 Jan 2004 02:59:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>A bunch of FUD if you ask me. And why would anyone test anything on the MS product. What a joke!</description>
			<pubDate>Fri, 09 Jan 2004 03:05:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>LOL, OSnews FUD rivals the SCO. Well the one thing I can say is that OSnews knows about making sales to idiots.</description>
			<pubDate>Fri, 09 Jan 2004 03:12:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I feel so sorry for people who use Microsoft, lol. It just keeps getting worse, lmao.</description>
			<pubDate>Fri, 09 Jan 2004 03:35:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Java 1.5</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I'm curious to know whether anyone has checked out the Java 1.5 Alpha?<br />
<br />
<a href="http://java.sun.com/developer/earlyAccess/j2sdk150_alpha/" rel="nofollow">http://java.sun.com/developer/earlyAccess/j2sdk150_alpha/</a></description>
			<pubDate>Fri, 09 Jan 2004 03:39:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>IDE slow startup time in Java</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Just one point, Java long startup time is caused by Java doing what most languages don't: class verification.   In essesnce, a scan of the class files to be sure they haven't been hacked.  <br />
<br />
Again, if you &quot;get&quot; Java you put up with the &quot;time&quot; issue for the benefit you get from the language.  The Java Security model and the productivity of it's huge class library.</description>
			<pubDate>Fri, 09 Jan 2004 03:45:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Try a real test, not some crap code, but a real test on a real platform -Linux. The Windows product is so messed up, it makes Michael Jacksons face look like Tom Cruise.</description>
			<pubDate>Fri, 09 Jan 2004 03:48:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Linked to Windows Libraries?!</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>The trig test is pointless, Windows libraries aren't compiled with gcc.  So is the I/O test.<br />
<br />
I am astonished that c# performs so well though.</description>
			<pubDate>Fri, 09 Jan 2004 04:04:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>How not to write a benchmark....</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Your code does not test for successful completion and<br />
accurate results!<br />
<br />
All that is needed to win your benchmark is a library<br />
like this:<br />
<br />
   double tan (double x) {return 1;}<br />
   double sin (double x) {return 1;}<br />
   double cos (double x) {return 1;}<br />
<br />
and so forth.  What is the value of fast but wrong<br />
answers?</description>
			<pubDate>Fri, 09 Jan 2004 04:05:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Unfair test-environment</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>testing gcc under cygwin and against windows libraries isnt actually fair is it? You test Visual C++, which is quite good native, why not test gcc under a POSIX-environment, for example linux, too? Perhaps Testing Visual C++ under Linux with wine should be done too?</description>
			<pubDate>Fri, 09 Jan 2004 04:10:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE:RE : All .net languages will perform the same</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Of course if you write crappy code in VB.net and good code in C# that does the same thing, yes you will get different results.  The point is if you write similar code that takes advantage of a particular .net language you are going to get almost identical results, which is what this benchmark reported.<br />
Understand....</description>
			<pubDate>Fri, 09 Jan 2004 04:17:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>He forgot three important languages</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>He left out three of the best languages - DELPHI,  EUPHORIA and Assembly. Believe me they are really fast as hell - Especially DELPHI.<br />
<br />
Can anyone give some benchmarks with these three languages?</description>
			<pubDate>Fri, 09 Jan 2004 05:28:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Paris Hilton</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description><i>How not to write a benchmark....	Your code does not test for successful completion and accurate results!</i><br />
<br />
(...much like the real Paris Hilton, a basic conceptual understanding is present but a knowledge of details is lacking...)<br />
<br />
As long as you're using standard runtimes or linking against standard libm's, there really isn't going to be a problem.<br />
<br />
Attempting to check the results may be especially problematic in certain areas, due to floating point round off error, unless you're doing all your testing on platforms with IEEE floats.</description>
			<pubDate>Fri, 09 Jan 2004 06:27:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>dougs shootout</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>There is an updated version, not maintained by dough, of doughs computer language shootout.<br />
Relaxen und watchen die numbers<br />
<br />
<a href="http://dada.perl.it/shootout/craps.html" rel="nofollow">http://dada.perl.it/shootout/craps.html</a><br />
<a href="http://dada.perl.it/shootout/craps2craps.html" rel="nofollow">http://dada.perl.it/shootout/craps2craps.html</a></description>
			<pubDate>Fri, 09 Jan 2004 06:38:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>more benchmarking</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>a rather wellknown bechmarking paper is the Kernighan and Van Wyk micro-benchmarks ( <a href="http://www.ccs.neu.edu/home/will/Twobit/KVW/kvwbenchmarks.html" rel="nofollow">http://www.ccs.neu.edu/home/will/Twobit/KVW/kvwbenchmarks.html</a>  ).<br />
it helped create The Great Computer Language Shootout ( <a href="http://www.bagley.org/~doug/shootout" rel="nofollow">http://www.bagley.org/~doug/shootout</a> ).<br />
<br />
<br />
bengt</description>
			<pubDate>Fri, 09 Jan 2004 07:26:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Unbaffling you on Java v. compield C++</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I may be able to help you a touch on understanding why the JDK beats C++ in some cases.  It comes down to one of two issues:<br />
<br />
(1) Object allocation.<br />
Object allocatio nis highly tuned in java because the goal is to encourage solid object oriented programming which means a LOT of object creation.  C allocation of memory and C++ object allocztion tend to be abyssmal. (Although to be fair, MSFT's C on MSFT&quot;s OS is about the best at it I've seen, coming cloe to Java peformance for some tests.)<br />
<br />
(2) Optimization<br />
Quite simply there is more information available at run-tiem on exactly how code is going to be used then you have through static analysis at compile time. Hotspot gets its name from the fact that it sports a very sophisticated profiler built into the run-time that analyzes actual code use and comes up with best case optimizations.  Some of these optimizations would be impossible at compile time because, although they are based on likely code behavior, they could be dangerous if an optimizer guessed wrong.  Being a run-time optimizer however Hotspot can pursue these optimizations and then back them out if it see the critical condition occur.<br />
<br />
A key example is what we call &quot;agressive inlining&quot;.  Hotspot will in-line any method call for which tehre is only one possible target from the current call site.  <br />
This is done by tracking what the currently loaded class hirearchy is.  If the hirearchy changes (through late binding) then those in-lines are backed out.<br />
This means that Java can effectively get rid of all v-table<br />
calls except those where the call site actually is poly-morphic.</description>
			<pubDate>Fri, 09 Jan 2004 08:41:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Author's Reply, part 1</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I expected plenty of comments and criticism, and you folks didn't disappoint! I do appreciate all of the suggestions on how to improve the benchmark. I'd like to respond to the questions or criticisms that either arose most often or that seem most significant. Some of the comments point to real methodological flaws, while others seem to come from a lack of understanding about what I was trying to achieve (which is probably my fault for not being clearer). Many of the complaints could have been avoided if I had included more detailed explanations of my testing procedures and their justifications, but I didn't want the article to get too long or too dry. So in no particular order, here we go...<br />
<br />
Why didn't you include my favorite language? It's [faster|newer|cooler] than any of the languages you picked.<br />
I had to limit the number of languages somehow, so I put together what I hoped was a representative selection of the major languages in use today. Also, I had limited time and limited skills. Sure I could have added Perl or Fortran or whatever, but then I would have had to learn enough Perl or Fortran to code the benchmark. Before starting this project, the only language I knew well enough to code even this simple benchmark in was Java/J#. Besides, if anyone is really interested in seeing how AppleScript, Standard ML of New Jersey, or Visual C# running on Mono compare, I invite you to  adapt my code and run it yourself. Porting over the benchmark should be trivial if you already know the language, and I'd love to see more results (particularly if you use Lisp, Forth, Perl, or Ruby).<br />
<br />
Why not use other C compilers? There are a ton of them out there.<br />
See  above.<br />
<br />
Why didn't you test on AMD hardware, or on a Solaris box?<br />
The only machine I had ready access to was my trusty P4 laptop.<br />
<br />
The GCC C code is going to run faster in a POSIX environment, linked to glibc instead of Windows libraries. Why didn't you run it on Linux?<br />
Lack of time, lack of space on my hard drive to dual-boot even a minimal Linux distro. I did run the gcc code within Cygwin, linked to the Cygwin libraries (I assume Cygwin uses glibc, but don't know for sure). I didn't post those results since they were nearly identical to the results of the gcc code linked to Windows libraries, but in retrospect I should have included them in my report.<br />
<br />
You didn't really test a fully interpreted language. Python gets compiled down to bytecode by the Python interpreter, so it doesn't count. Why not include Perl or PHP?<br />
Good point. I didn't realize that any compilation was going on at all with Python until I read about it here. So yes, it would be instructive to see Perl results (assuming it really is fully interpreted--there seems to be some debate here on that point). But I don't know Perl and am trying my best never to learn it.<br />
<br />
All .NET languages should perform the same. Why did you benchmark all four of them?<br />
Because I wanted to see if Microsoft is telling the truth when they say that functionally identical code gets compiled into identical MSIL code. It turns out that, for the most part, it does.<br />
<br />
You can't be a serious .NET programmer if you don't even know how to start an unmanaged Visual C++ project!<br />
You're right. I'm not. But now I know how to do it, thanks. I considered using Visual C++ 6 instead, but ultimately decided to just stick with whatever languages Microsoft's throwing their weight behind now, and that's the .NET languages.<br />
<br />
It's unfair to test Java 1.4.2 with the -server flag, but Java 1.3.1 with the -client flag. Everyone knows that the -server version of the JVM runs bytecode faster than the -client version (at the expense of slightly longer startup time).<br />
I was astonished to see that the JVM included with the 1.3.1 SDK doesn't have a -server version. The only flag available for setting the JVM version is -hotspot, which is the default JVM for 1.3.1 anyway. Install a 1.3.1 SDK, type &quot;java -help&quot; and see for yourself. Maybe they had the -server option in earlier versions of 1.3.1--I used 1.3.1_09.<br />
<br />
Why is it surprising to see Java perform well? The bytecode is compiled by the JVM before (or as) it runs, after all.<br />
It's surprising only because everyone thinks Java is slow. This is probably because early versions of Java really were slow, but I think we're now witnessing a case of perception lagging behind reality.<br />
<br />
Java 1.4.2 is slow on the trig component because it's using the StrictMath package, which trades speed for accuracy.<br />
Well, maybe. I called the Math package, which (as stated in the Javadoc) may or may not in turn call the StrictMath package. So I don't really know what's going on behind the scenes. I did randomly compare results out to eight decimal places or so and got the same trig results for all languages.<br />
<br />
You're not being fair to VB--you're using its native I/O functions instead of using the standard CLR I/O classes.<br />
You're probably right, but what I did was... hang on. This requires a detour for a second. I'll come back to this after the next comment.<br />
<br />
You said the only language you knew before writing these benchmarks was Java. Then what right do you have to call these real benchmarks? There are probably all sorts of optimizations that you didn't know about and didn't use--real programmers understand their languages better and know how to squeeze performance out of them. No one codes production-quality code after spending a single afternoon learning a language!<br />
I beg to differ. For better or worse, tons of people code exactly like that. In my industry (IT consulting), virtually everyone does! It's absolutely routine to be given a programming task, a language, and an unrealistic deadline. You're expected to learn what you can from on-line help, whatever tutorials you can scrounge up on the net, and O'Reilly books, and cobble together code that works. In an ideal world we'd have loads of time to optimize everything and profile the heck out of code before releasing it, but on an actual project that's very rare. At least, that's been my experience. So I treated these benchmarks the same way: pick up a book, learn how to do what you need to do, spend a little time making sure you're being smart about stuff (use buffered I/O streams in Java, for example), but don't expect it to be 100% optimized. Then move on to the next language. My results won't duplicate results derived from laboratory conditions, but they should be close to real world (or at least, IT consulting world) results. This is a point I should have made much, much clearer in the article, and I'm sorry for the confusion I caused by not being making it more explicit.<br />
<br />
You never answered the VB I/O question!<br />
Right. I learned how to do VB I/O by using the built-in help in Visual Studio .NET 2003. I did what it told me to do. If it told me to use native VB I/O classes, that's what I did. If I had spent a lot more time poking around I might have been able to figure out how to use more efficient CLR classes, but that route was non-obvious and I had no way of knowing whether its code would have been faster without actually trying it. Again: I was trying to replicate real-world, time-constrained, scenarios with programmers who know the basics but are by no means experts. Having said all that, I appreciate the advice about speeding up VB I/O. Some day I may re-code with that change in mind.<br />
<br />
continued in next post...</description>
			<pubDate>Fri, 09 Jan 2004 08:59:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Author's Reply, part 2</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>...continued from previous post<br />
<br />
These results are not indicative of anything. Real programs do more than just math and I/O. What about string manipulation? What about object creation? etc.<br />
The short answer: of course you're right. But most programs do some math and some I/O, so these results will be at least somewhat relevant to virtually any program. Besides, I made liberal use of the phrase &quot;limited scope&quot; and even titled the article &quot;Math and File I/O&quot; so no one could claim false advertising! The longer answer is more interesting, but probably also more controversial. I think it's fair to say that there are two camps when it comes to benchmarking: the &quot;big, full-scale application benchmark&quot; camp and the &quot;tiny building block benchmark&quot; camp. The arguments used by members of each camp go like this. Big is more accurate in that it tests more of the language and tests complex interactions between the various parts of the language. That's why only large applications like the J2EE Pet Store (later copied by Microsoft to demonstrate .NET performance) are helpful. But wait, says the other camp. Small is more accurate because it tests common components that all programs share. Big is useless because it covers performance for your program, not mine. Mine may use very different parts of the language than yours, hence show very different results. Performance results gleaned from a database-heavy application like Amazon's on-line catalogue can tell us nothing about what language to use when coding a CPU-intensive Seti@Home client. No no, the big camp retorts, small is useless because it doesn?t really do much, and what it does do reduces to near-identical calls to the OS or basic CPU operations. Small doesn?t let differences between various languages show through, because the aspects that are unique to each language are not tested. My own take on the issue is this: all of these points are true, and they suggest that the only worthwhile benchmarking is lots of different benchmarks, written on different scales, testing different things. Throw together enough different sorts of benchmarks and you?ll end up with something useful. The benchmark I presented here falls within the &quot;small benchmark&quot; camp simply because small benchmarks are a whole lot quicker and easier to write than big benchmarks. But I've presented just one (or two, if you split up math and I/O) benchmark. These results are not useless by any means, but they become a whole lot more useful when they are combined with other benchmarks with different scopes, testing different aspects of languages (such as string manipulation, object creation, collections, graphics, and a gazillion others). And while my project can certainly be criticized for being ?too small,? keep in mind that different languages do produce different results under this benchmark, so it is showing some sort of difference between the languages. In other words, I don?t think it?s too small to be at least a little helpful.<br />
<br />
The compile time required for JIT compilers (like a JVM) approaches zero when it's amortized over the time that a typical server app (for example) runs. Shouldn't you exclude it from your test?<br />
Good point; I hadn't thought of that. Next time I will probably exclude it by calling each function once before starting the timer.<br />
<br />
Java should perform about the same as C++, and an unmanaged C program should perform better than a managed .NET program. Why run benchmarks when we all know how they'll turn out?<br />
Because theory isn't always borne out in reality.<br />
<br />
The sorting criteria (using the total instead of a geometric average) is unusual, and favors languages that optimize slow operations.<br />
I did not know about the geometric mean technique, but am very interested in hearing more about it. I had no idea how best to weight the various components of the benchmark, so figured the easiest thing to do was to weight them equally and just add them all up. Some may complain that since the trig component is relatively small, it should be given less weight in the final tally. But I would respond that it?s not small for all languages. The trig component for Java 1.4.2 is longer than all of that language's other components combined. But the real answer to the problem of sorting and analyzing the results is simple: if people want to massage the raw data differently (maybe you never use trig in your programs, so want to exclude the trig results entirely), go for it! And be sure to tell us what you come up with.<br />
<br />
You should use more than 3 runs, and you should provide the mean and median of all scores.<br />
I actually did more like 15 to 20 runs of each benchmark, with at least 3 under tightly controlled conditions. I was a little surprised to find that there were virtually no differences in results regardless of how many other processes were running or how many resources were free. I guess all the other processes were running as very low priority threads and didn't interfere much. I deliberately included only the best scores rather than the median because I didn't want results skewed by a virus scanner firing off in the background, or some Windows file system cache getting dumped to disk just as the I/O component started. I figured the best case scenario was most useful and most fair.<br />
<br />
Why didn't you use a high-speed math package for Python, such as numpy or numeric?<br />
I didn't know about numpy or numeric. I probably should have used a high-speed math package, assuming it would be something that a new Python programmer could find out about easily and learn quickly.<br />
<br />
Shouldn't stuff like this be peer reviewed before being posted? <br />
This ain't Nature or Communications of the ACM--I figure the 100+ comments I received do constitute a peer review! <img src="/images/emo/smile.gif" alt=";)" />  Nevertheless, I like your idea of a two-part submission, with methodological critique after part 1 and results presented in part 2. I'll remember that for next time.<br />
<br />
Your compile-time optimization is inconsistent. E.g., why omit frame pointers with Visual C++ but not gcc C?<br />
Because Visual Studio had an easy checkbox to turn on that optimization, whereas the 3 minutes I spent scanning the gcc man page revealed -O3 but not -fomit-frame-pointers. Similarly, I compiled Java withy -g:none to turn strip debugging code but didn't mess with memory settings for the JVM. Someone who programs professionally in C/C++ (or knows more about Java than I do) could have hand-tuned the optimizations more successfully, I'm sure.<br />
<br />
Your C++ program is really just C! What gives?<br />
I don?t know C++. I taught myself just enough C (from an O?Reilly book) to code the benchmark. So yes, the C++ benchmark is running pure C code. From my rudimentary knowledge of C vs. C++, I assumed that there were no important extensions to C that would produce significantly different performance over straight C for low-level operations like this, so I stuck to straight C. I called it a ?Visual C++? benchmark because it was compiled by Microsoft?s C++ compiler. And if C++ really is a superset of C (please correct me if that?s not the case?I could be very wrong), then a C program is also a C++ program.<br />
<br />
Your trig results are meaningless because you don't check the accuracy of the results. You could be trading accuracy for speed.<br />
Mea culpa--I did sample the trig test results to compare accuracy across languages; they're all equally accurate (at least, to 8 decimal places or so). I forgot to explain that in the article.<br />
<br />
Again, thanks for all of the comments. I?ve learned a lot from your suggestions and future benchmarks I may run will certainly benefit from the collective experience of all of the posters.<br />
<br />
-- Chris Cowell-Shah</description>
			<pubDate>Fri, 09 Jan 2004 09:01:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Python numbers</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Python is in these tests because it has to look up the variable each time.  <br />
<br />
For example:  i = i + 1.  In Python i is a word that is stored in a hash that points to an pointer.  In the C code it's just a memory location on the stack.  Of course, the slow down does affect real life but maybe not as much as it affects this benchmark.<br />
<br />
The Long test is unfair for Python because Python has true big number support (based on how much memory you have).  In C and Java long is around 64 bits only.  In those languages there are special libraries for really large numbers.  Apple to oranges type situation.<br />
<br />
Python does OK in the trig test because all those functions are implemented in C.  It still suffers from the variable name look up problems though.</description>
			<pubDate>Fri, 09 Jan 2004 09:05:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Your C++ program is really just C!</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&quot;I don?t know C++. I taught myself just enough C (from an O?Reilly book) to code the benchmark. So yes, the C++ benchmark is running pure C code. From my rudimentary knowledge of C vs. C++, I assumed that there were no important extensions to C that would produce significantly different performance over straight C for low-level operations like this, so I stuck to straight C. I called it a ?Visual C++? benchmark because it was compiled by Microsoft?s C++ compiler. And if C++ really is a superset of C (please correct me if that?s not the case?I could be very wrong), then a C program is also a C++ program.&quot;<br />
<br />
Yes, but that is a poor excuse. The C# benchmark uses a class, and the C++ class would have been pretty much the same, bar tha main function being external to the class.<br />
<br />
You need to look at the &quot;iostreams&quot; C++ standard library header (you may find it as &quot;iostreams.h&quot; under some environments.) Look at the cout instance variable, and note that it completely replaces printf, as iostreams replaces stdio.<br />
<br />
for example:<br />
<br />
printf(&quot;my value %d&quot;, d);<br />
<br />
vs.<br />
<br />
cout</description>
			<pubDate>Fri, 09 Jan 2004 10:56:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title> .NET  benchmarks are illegal</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/redisteula.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dn...</a> <br />
<br />
snip --<br />
You may not disclose the results of any benchmark test of the .NET Framework component of the OS Components to any third party without Microsoft's prior written approval. Microsoft retains all right, title and interest in and to the OS Components. All rights not expressly granted are reserved by Microsoft.<br />
snip ---<br />
<br />
Sick but true...</description>
			<pubDate>Fri, 09 Jan 2004 11:56:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Should include Fortran95</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>When doing numerical work and you want a list of _modern_ computer languages, then the list is incomplete without Fortran95.  Available on a wide range of platforms, Fortran is still very widely used in scientific and technical applications, and Fortran2003 will be fully object-oriented.<br />
<br />
If I had time I'd be happy to try these benchmarks on a few modern F90 compilers, but I do think they are a bit naive.  Just one example: memory utilisation is an important factor in many problems: you need a few tests using large arrays or matrices.</description>
			<pubDate>Fri, 09 Jan 2004 12:07:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Re: Java, and legal considerations</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&gt; Last of all, I'd like to draw the author's attention to the <br />
&gt; .Net framework EULAs... It is in fact a violation of the <br />
&gt; EULA to produce benchmarks of this sort of .Net against <br />
&gt; other platforms. Which is why they haven't been done all <br />
&gt; over the place by now <img src="/images/emo/smile.gif" alt=";)" />  <br />
<br />
Such a requirement would be illegal in Europe, and more so in the US, it's against the right to free speach.</description>
			<pubDate>Fri, 09 Jan 2004 12:18:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: .NET benchmarks are illegal</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>EULA's are not the law, thus this benchmark is not illegal. On the other hand, it's very lilely that that clause in the EULA is against the law, and as such invalid.</description>
			<pubDate>Fri, 09 Jan 2004 12:25:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>other benchmark</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Sorting would be interesting too.<br />
<br />
                      DG</description>
			<pubDate>Fri, 09 Jan 2004 12:30:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Intel C compiler</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Why isn't the Intel C compiler benchmarked along with the others? I'm sure it would give the best result.</description>
			<pubDate>Fri, 09 Jan 2004 12:39:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Reply to authors comments</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Hello,<br />
<br />
Although I see where you are coming from with your comments, I am not quite sure they are correct.<br />
<br />
Your benchmark is designed to measure intensive Math and IO. Thus, it is designed to be useful for a programer who (gasp) is doing intensive Math and IO.<br />
<br />
In such a program, the programmer would normally take the initative to make his program as fast as possible. If he saw that the IO in his VB program was 3x as slow as the raw IO speed achieved by C, he very likely would have profiled his program. Running the VB program in CLR profiler it is pretty clear what is up.<br />
<br />
Your argument that: `Again: I was trying to replicate real-world, time-constrained, scenarios with programmers who know the basics but are by no means experts. Having said all that, I appreciate the advice about speeding up VB I/O. Some day I may re-code with that change in mind. ' is pretty much invalid then. If you want to simulate the performance for newbie programmers in each language, than that is what you should title your article.<br />
<br />
Remember, the VS.net tutorials are not designed for writing high performance apps. They are designed to get you off the ground when designing something.</description>
			<pubDate>Fri, 09 Jan 2004 12:57:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>C/C++ Math Performance</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I suppose this might be the right place to mention that C/C++ has libraries available like Blitz++ that can make scientific and mathematical operations faster than in Fortran.</description>
			<pubDate>Fri, 09 Jan 2004 13:01:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>blah...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>#include &quot;time.h&quot;<br />
#include <br />
<br />
using namespace std;<br />
<br />
template  T arithmetic(const T min, const T max, double&amp; rtime);<br />
<br />
int main()<br />
{<br />
	const int int_min =		1;<br />
	const int int_max =		1000000000; // 1B<br />
	const double double_min =	10000000000.0; // 10B<br />
	const double double_max =	11000000000.0; // 11B<br />
	const long long ll_min =	10000000000; // 10B<br />
	const long long ll_max =	11000000000; // 11B<br />
<br />
	cout</description>
			<pubDate>Fri, 09 Jan 2004 13:25:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Java versus C and other native compiled languages</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I ran this &quot;benchmarks&quot; on my Linux,PIII/600Mhz,320MB Ram<br />
gcc 3.3.2 versus java 1.4.2(sun). The results are nearly the same gcc versus java <br />
int gcc 21.0s : java 21.9s)<br />
double 23.6s : 33s<br />
long 71s : 69.9s, <br />
trig 14s : 393s !!!!!!<br />
I/O 2.5s : 40.7s !!!!!<br />
<br />
and what about memory allocation ( creating/deleting) objects !!!!<br />
<br />
someone mentioned this ....<br />
Java actually knows more about how the code is used, which in theory should let it reach better performance than c/c++<br />
bla bla bla ....<br />
<br />
this is incredible ... :-))))</description>
			<pubDate>Fri, 09 Jan 2004 13:42:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>err</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&quot;someone mentioned this ....<br />
Java actually knows more about how the code is used, which in theory should let it reach better performance than c/c++<br />
bla bla bla .... &quot;<br />
<br />
This is crap.....The JITer &quot;knows&quot; only about the current method. That method is the only thing that can be &quot;enhanced&quot;. On the other hand when it's compiled the C/C++ compiler &quot;has access&quot; to the whole thing and can do a better job on &quot;tweaking/enhancing&quot; the speed...<br />
<br />
&quot;what about memory allocation ( creating/deleting) objects !!!! &quot;<br />
On this category the winner is CLR.</description>
			<pubDate>Fri, 09 Jan 2004 13:55:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>perl test and another test method</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I've sent the auther a perl version that i hacked up during lunch break. I hope he'll post the results along with the others. I &quot;ported&quot; it from the C version, keeping the authors original style of writing (all math in perl/python is FP anyway)<br />
<br />
I once did a test of perl vs. python vs. C (as ref. language) by using a small is_prime function, and then setting it off on a given range of primes. I didnt keep the results, but if i remember correct, C would finish quite fast, perl would take it's sweet time, and python was just dog slow (all tests without optimisation, and no precompilation for intepreted languages). I never did a Java port of it (target was a unix platform, and java is not my first choise there), but it would be interesting to see any comparisons. The algorithm is (C syntax ) : <br />
<br />
int is_prime(unsigned long x)<br />
{<br />
    if(x  x)<br />
                 return(1);<br />
             ctr+=2;<br />
        }<br />
    }<br />
}</description>
			<pubDate>Fri, 09 Jan 2004 13:55:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Why did VB do so bad in IO</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Why did VB do so bad in IO when they are all .Net langugues?  I mean they were pretty equal up until the IO part.  Any chances of getting the code published for each?</description>
			<pubDate>Fri, 09 Jan 2004 15:30:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Slashdotted!</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Serves you right for all those Xandros Reviews you keep posting.</description>
			<pubDate>Fri, 09 Jan 2004 15:49:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>IF C++ really is a superset of C...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>It's not. C++ just looks like C because it was felt that it would make it more familiar to programmers. Originally Stroustrup's work focused on adding syntactic sugar to support OO programming with C. At this point it was a strict superset, and Stroustrup used ordinary C compilers along with a pre-processor.<br />
<br />
Fast forward a few years and the language is much more complicated and has acquired the name &quot;C++&quot; despite objections. It has also escaped AT&amp;T and is now the &quot;next big thing&quot;. Unfortunately standardisation, and compiler quality still leave a lot to be desired.<br />
<br />
An unfortunate side effect, especially outside Unix, was that people took C++ to be &quot;C, only better&quot; and began to insist that good C programs be re-written as bad C++ programs. Since C was in fact standardised, portable and had a working ABI, while C++ had not (some would say still has not today) these things, the cost was uncountable.<br />
<br />
There's a section in Stroustrup's book &quot;The C++ language&quot; which confirms that in fact C++ is not a superset and was not intended to be. Since ISO C9X is actually newer than the C++ split, it has features which aren't present in C++ at all. Some programs are valid C and valid C++ but mean different things in each language, a recipe for disaster.</description>
			<pubDate>Fri, 09 Jan 2004 15:58:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>method-calls, string-operations, regexp, hashtables</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I missed benchmarking of 'real-life' actions like instantiation, method-calls with and without params, string-operations, regexp, hashtables...<br />
(didn't read the whole article though)</description>
			<pubDate>Fri, 09 Jan 2004 16:44:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Open Source Language Comparison Framework</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>[ copied from my slashdot posting on this article. ]<br />
<br />
 We weren't quite ready to release it, but we've been working on a language performance comparison test of our own. It is available at:<br />
<br />
<a href="http://scutigena.sourceforge.net/" rel="nofollow">http://scutigena.sourceforge.net/</a><br />
<br />
It's designed as a framework that ought to run cross-platform, so you can run it yourself. We haven't added it yet, but I think we really want to divide the tests into two categories. &quot;Get it done&quot; - and each language implements it the best way for that language, and &quot;Basic features comparison&quot; - where each language has to show off features like lists, hash tables, how fast function calls are, and so forth.<br />
<br />
It's an ongoing project, so new participants are welcome! I would appreciate it if comments went to the appropriate SF mailing lists instead of here, so that I can better keep track of them.</description>
			<pubDate>Fri, 09 Jan 2004 17:24:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Another benchmarking C/C++/Java/C#</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I have benchmarked fast string search. Results here : <a href="http://www.arstdesign.com/articles/fastsearch.html" rel="nofollow">http://www.arstdesign.com/articles/fastsearch.html</a></description>
			<pubDate>Fri, 09 Jan 2004 17:39:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>VB IO results are skewed</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>The VB IO component of the benchmark uses the backwards compatibility routines to do IO -- routines which were never intended for performance.  The correct way to IO in VB is to use the StreamReader and StreamWriter classes in the .NET frameworks.</description>
			<pubDate>Fri, 09 Jan 2004 18:07:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>benchmarks are for comparison and learning...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>your comments about not having time to learn a language is fine if that is the quality of code that yout customers of Accenture want.  However when you take upon yourself the idea to publish a BENCHMARK you have the right to do a standard job and this is totally suboptimal work.  If I were your boss and had assigned you a benchmark and told you to publish it with Accenture's name on it.  I would have told you that you DID NOT MEET expectations.  <br />
<br />
Having spent a number of years in Silicon Valley after a few years in what was then Big 6 consulting, your document fails for BOTH communities.</description>
			<pubDate>Fri, 09 Jan 2004 18:29:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Memory footprint</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Memory footprint of the benchmark on different languages should be interesting too!</description>
			<pubDate>Fri, 09 Jan 2004 18:44:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>This was already done... Overall Performance of Computer Languages...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Google -&gt; The Great Programming Language shootout... for more details pertaining to system functions and tests...</description>
			<pubDate>Fri, 09 Jan 2004 18:56:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Some benchmark ideas to keep you busy</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Function calls<br />
Method calls<br />
Recursion<br />
Recursion (no tail optimisation)<br />
Recursion with several locals (no tail optimisation)<br />
Recursion with large local array (no tail optimisation)<br />
Deeply nested (different) function calls<br />
<br />
Heap allocate<br />
Heap re-allocate<br />
Heap de-allocate<br />
Heap fetch, store, move<br />
Heap allocate with random de-allocations for small sizes<br />
Heap allocate with random de-allocations for large sizes<br />
Heap allocate with random de-allocations for mixed sizes<br />
Heap allocate and copy<br />
<br />
Local fetch, store, increment<br />
Global fetch, store, increment<br />
Member fetch, store, increment (with or without getters/setters)<br />
Array fetch, store, increment<br />
Array fetch, store, increment (2 dimensional)<br />
Pointer fetch, store, increment<br />
Pointer-to-pointer fetch, store, increment<br />
<br />
Loop and compare (while)<br />
Static numbered loop (for)<br />
<br />
Graphic composition<br />
Bitmap flip<br />
Bitmap blit<br />
Bitmap flip while window moving<br />
<br />
Linked list generation<br />
Linked list sort<br />
Linked list search<br />
Linked list random insert<br />
Linked list random insert (with automatic sort)<br />
Linked list random deconstruct<br />
Linked list destroy<br />
<br />
XML parse<br />
XML tree sequential traverse<br />
XML tree random search<br />
<br />
Socket send packets throughput over controlled LAN<br />
Socket recieve throughput over controlled LAN<br />
Socket two-way throughput over controlled LAN<br />
Socket response/latency over controlled LAN<br />
Socket response/latency under heavy load over controlled LAN<br />
<br />
Signal/event response idle<br />
Signal/event response in busy loop<br />
Signal/event response under heavy memory access<br />
Signal/event response under heavy I/O<br />
Signal/event response under heavy calculation<br />
<br />
Thread spawn latency<br />
Fetch, store, move, copy, increment mutexed memory with many threads sharing<br />
<br />
(All the random stuff should be pre-generated so that it's the same every test).</description>
			<pubDate>Fri, 09 Jan 2004 18:56:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>non-IEEE compliant</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Important Note:  Pentium trig functions are not IEEE compliant. GCC's trig functions are.  If you need accuracy you cannot unse the built in intel trig functions.  The MS compilers in this test used the built in trig functions.  You can di this with GCC; however, you have to specify it in the code. I seriously doubt this was done.<br />
<br />
Bottom line:  The trig functions in this test are not computing the same thing.  The MS results will give 5-6 digits of precision.  GCC's will be correct to 12+.  *HUGE* difference.</description>
			<pubDate>Fri, 09 Jan 2004 19:09:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Did you disable/enable the optimizations in VB.NET?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>It's not clear from the text that you used the compile options to remove integer overflow checks and enable optimizations which are already done by default in C#. This can account for (sometimes) significant differences in the compiled code.</description>
			<pubDate>Fri, 09 Jan 2004 19:13:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Test with IBM 1.4.1 on Linux</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I ran the benchmark with both Sun 1.4.2 and IBM 1.4.1. The IBM VM used 38.2 secs, while Sun used 121.5 secs, a considerable difference (yes, I used the server VM).<br />
<br />
In particular, IBM was 8 times faster with the trigonometic computations, and almost twice as fast with longs.</description>
			<pubDate>Fri, 09 Jan 2004 19:18:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Re: Java, and legal considerations (Fabio Alemagna)</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&quot;Such a requirement would be illegal in Europe, and more so in the US, it's against the right to free speach.&quot;<br />
<br />
No it isn't. I don't know how many times I have seen people make statements like this without really knowing what &quot;free speech&quot; is all about... But it is likely that those requirements would be unenforcable in most countries (for other reasons).</description>
			<pubDate>Fri, 09 Jan 2004 19:26:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>gcc results</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>The gcc results look so bad because there is something <br />
wrong with the math libraries in MinGW and cygwin.<br />
<br />
Being extremely surprised by the fact that the trig <br />
run times with gcc are almost 4 times longer than <br />
with .NET, I redid the trig test with each operation  <br />
tested individually. Here the results on a dual boot <br />
2 GHz P4 laptop (WinXP and SuSE Linux 9) using <br />
-O3 -ffast-math -march=pentium4 -mfpmath=sse -msse2<br />
as optimization options in both cases:<br />
<br />
WinXP and the cygwin version of GCC 3.3.1:<br />
sin: 1.03 seconds<br />
cos: 1.02 seconds<br />
tan: 10.33 seconds<br />
log: 1.92 seconds<br />
sqrt: 0.20 seconds<br />
all 5 in the same loop: 14.36 seconds<br />
WinXP and MinGW: results essentially identical<br />
<br />
SuSE 9 and GCC 3.3.1:<br />
sin: 1.02 seconds<br />
cos: 0.99 seconds<br />
tan: 1.16 seconds<br />
log: 0.57 seconds<br />
sqrt: 0.21 seconds<br />
all 5 in the same loop: 3.59 seconds<br />
<br />
Clearly, there is something wrong with the tan and <br />
log functions on cygwin and MinGW.<br />
<br />
So, the whole test on Linux:<br />
integer arithmetic: 9.6<br />
long integer: 24.5<br />
double: 8.4<br />
trig: 3.6<br />
I/O: 1<br />
total: 47.1<br />
<br />
Someone was interested in the Intel compiler results, <br />
here they are:<br />
integer: 9.0<br />
long integer: 39.9<br />
double: 7.0<br />
trig: 4.4<br />
I/O: 1.1<br />
total: 61.4<br />
=&gt; if you have to use 64 bit integers in your <br />
program, don't use the Intel compiler.</description>
			<pubDate>Fri, 09 Jan 2004 20:30:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>VB.NET Slower?.... please!</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>You'd better learn VB.NET better before issuing such kind of benchmarks...<br />
Thumbs down... :-(</description>
			<pubDate>Fri, 09 Jan 2004 21:04:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>java's writer/reader classes are doing more than you intend</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>A nit about the tests:<br />
<br />
The java benchmark is using the Reader/Writer classes rather than their InputStream/OutputStream counterparts.  Reader and Writer are performing unicode conversions, which is apparently having a major impact.  Switching to the InputStream/OutputStream classes with the 1.4.2 jvm (-server option) on linux gave the IO portion of the benchmark a 24% speed boost.<br />
<br />
I would also recommend that for this benchmark, rather than calling FileWriter.write(yourString), you do something more akin to:<br />
<br />
byte[] b = yourString.getBytes();<br />
(loop) {<br />
     yourFileOutputStream.write(b);<br />
     ...<br />
}<br />
<br />
I believe that such a change would make the java IO portion of the benchmark more fair.<br />
<br />
- Marty</description>
			<pubDate>Fri, 09 Jan 2004 21:30:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>JDK 1.5 times</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I ran the benchmark with jdk 1.5 alpha compiler<br />
<br />
Box is an Athlon XP 1700, Windows 2k 512M memory<br />
<br />
Times:<br />
int math 9796<br />
double math 14406<br />
long math 19735<br />
trig 53890<br />
i/o 6266<br />
total benchmark 104094<br />
<br />
Time in milliseconds, and I ran with -server option compiled with debug info off</description>
			<pubDate>Fri, 09 Jan 2004 21:46:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Java and the log method</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Christopher raised the question of why Java only provides a method to calculate the natural log and not one to calculate the log base 10.  The only reason I can think of is that calculating log base 10 from the natural log is easily done using a routine of the form:<br />
<br />
public double log10 (double number) {<br />
        return Math.log(number) / Math.log(10);<br />
}<br />
<br />
This routine is based on the standard mathematical formula log base a (x) = log base b (x) / log base b (a).  It is applied in the following form here: log(x) = ln(x) / ln(10).<br />
<br />
While this doesn't justify not putting it in there, it's possible that the minimalistic but complete provision of the natural log method is what was desired.<br />
<br />
Just my $0.02.</description>
			<pubDate>Fri, 09 Jan 2004 21:58:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>delphi benchmark</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>hi<br />
<br />
i convert the code to delphi:<br />
<br />
Code :<br />
<br />
  <br />
  program Benchmark;<br />
  <br />
  {$APPTYPE CONSOLE}<br />
  <br />
  uses<br />
    SysUtils,<br />
    MMSystem,<br />
    Math;<br />
  <br />
  var<br />
    startTime :Longint;<br />
    stopTime :Longint;<br />
    elapsedTime :Longint;<br />
  <br />
    intMax :integer;<br />
    doubleMin <img src="/images/emo/grin.gif" alt=";)" /> ouble;<br />
    doubleMax <img src="/images/emo/grin.gif" alt=";)" /> ouble;<br />
    longMin :Int64;<br />
    longMax :Int64;<br />
    trigMax <img src="/images/emo/grin.gif" alt=";)" /> ouble;<br />
    ioMax :integer;<br />
  <br />
    intArithmeticTime: double;<br />
    doubleArithmeticTime <img src="/images/emo/grin.gif" alt=";)" /> ouble;<br />
    longCountTime <img src="/images/emo/grin.gif" alt=";)" /> ouble;<br />
    trigTime <img src="/images/emo/grin.gif" alt=";)" /> ouble;<br />
    ioTime <img src="/images/emo/grin.gif" alt=";)" /> ouble;<br />
    totalTime <img src="/images/emo/grin.gif" alt=";)" /> ouble;<br />
  <br />
  <br />
    function intArithmetic(intMax:integer):Longint;<br />
    var<br />
      intResult :integer;<br />
      i :integer;<br />
    begin<br />
  <br />
      startTime := timeGetTime;<br />
    intResult := 1;<br />
    i := 1;<br />
      <br />
    while (i &lt; intMax) do<br />
    begin<br />
     intResult := intResult - i;<br />
        inc(i);<br />
        intResult := intResult + i;<br />
        inc(i);<br />
        intResult := intResult * i;<br />
        inc(i);<br />
        intResult := intResult div i;<br />
        inc(i);<br />
    end;<br />
  <br />
    stopTime := timeGetTime;<br />
    elapsedTime := stopTime - startTime;<br />
  <br />
    WriteLn('Int arithmetic elapsed time: ' + inttostr(elapsedTime) + 'ms with max of ' + inttostr(intMax));<br />
    WriteLn(' i: ' + inttostr(i) + ' intResult: ' + inttostr(intResult));<br />
    result := elapsedTime;<br />
  <br />
    end;<br />
  <br />
    function doubleArithmetic(doubleMin, doubleMax:Double):Longint;<br />
    var<br />
      doubleResult <img src="/images/emo/grin.gif" alt=";)" /> ouble;<br />
      i :double;<br />
    begin<br />
  <br />
      startTime := timeGetTime;<br />
  <br />
    doubleResult := doubleMin;<br />
    i := doubleMin;<br />
  <br />
    while (i &lt; doubleMax) do<br />
    begin<br />
     doubleResult := doubleResult - i;<br />
        i:=i+1;<br />
        doubleResult := doubleResult + i;<br />
        i:=i+1;<br />
        doubleResult := doubleResult * i;<br />
        i:=i+1;<br />
        doubleResult := doubleResult / i;<br />
        i:=i+1;<br />
    end;<br />
  <br />
    stopTime := timeGetTime;<br />
    elapsedTime := stopTime - startTime;<br />
  <br />
    WriteLn('Double arithmetic elapsed time: ' + inttostr(elapsedTime) + ' ms with min of ' + floattostr(doubleMin) + ', max of ' + floattostr(doubleMax));<br />
    WriteLn(' i: ' + floattostr(i) + ' doubleResult: ' + floattostr(doubleResult));<br />
    result := elapsedTime;<br />
  <br />
  <br />
    end;<br />
  <br />
    function longArithmetic(longMin, longMax:Int64):Longint;<br />
    var<br />
      longResult :Int64;<br />
      i :Int64;<br />
    begin<br />
  <br />
      startTime := timeGetTime;<br />
  <br />
     longResult := longMin;<br />
     i := longMin;<br />
  <br />
    while (i &lt; longMax) do<br />
    begin<br />
        longResult := longResult - i;<br />
        inc(i);<br />
        longResult := longResult + i;<br />
        inc(i);<br />
        longResult := longResult * i;<br />
        inc(i);<br />
        longResult := longResult div i;<br />
        inc(i);<br />
    end;<br />
  <br />
      stopTime := timeGetTime;<br />
    elapsedTime := stopTime - startTime;<br />
  <br />
    WriteLn('Long arithmetic elapsed time: ' + inttostr(elapsedTime) + ' ms with min of ' + inttostr(longMin) + ', max of ' + inttostr(longMax));<br />
    WriteLn(' i: ' + inttostr(i));<br />
    WriteLn(' longResult: ' + inttostr(longResult));<br />
    result := elapsedTime;<br />
  <br />
  <br />
    end;<br />
  <br />
    function trig(trigMax:double):Longint;<br />
    var<br />
      sine :double;<br />
      cosine :double;<br />
      tangent :double;<br />
      logarithm :double;<br />
      squareRoot :double;<br />
      i :double;<br />
    begin<br />
  <br />
  <br />
      startTime := timeGetTime;<br />
  <br />
      sine := 0.0;<br />
    cosine := 0.0;<br />
    tangent := 0.0;<br />
    logarithm := 0.0;<br />
    squareRoot := 0.0;<br />
    i := 0.1;<br />
    while (i &lt; trigMax) do<br />
      begin<br />
      sine := Sin(i);<br />
      cosine := Cos(i);<br />
      tangent := Tan(i);<br />
      logarithm := Log10(i);<br />
      squareRoot := sqrt(i);<br />
     i := i+1;<br />
    end;<br />
  <br />
    stopTime := timeGetTime;<br />
    elapsedTime := stopTime - startTime;<br />
  <br />
    WriteLn('Trig elapsed time: ' + inttostr(elapsedTime) + ' ms with max of ' + floattostr(trigMax));<br />
    WriteLn(' i: ' + floattostr(i));<br />
    WriteLn(' sine: ' + floattostr(sine));<br />
    WriteLn(' cosine: ' + floattostr(cosine));<br />
    WriteLn(' tangent: ' + floattostr(tangent));<br />
    WriteLn(' logarithm: ' + floattostr(logarithm));<br />
    WriteLn(' squareRoot: ' + floattostr(squareRoot));<br />
    result := elapsedTime;<br />
  <br />
  <br />
    end;<br />
  <br />
    function io(ioMax:integer):Longint;<br />
    var<br />
      textLine :string;<br />
      i:integer;<br />
      myLine:string;<br />
      F:TextFile;<br />
    begin<br />
  <br />
      startTime := timeGetTime;;<br />
  <br />
      textLine := 'abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567 890abcdefgh'; <br />
      i := 0;<br />
     myLine := '';<br />
  <br />
      assignfile(F,'TestDelphi.txt');<br />
      rewrite(F);<br />
      while (i &lt; ioMax) do<br />
    begin<br />
        Writeln(F,textLine);<br />
        inc(i);<br />
    end;<br />
  <br />
      CloseFile(F);<br />
  <br />
    stopTime := timeGetTime;<br />
    elapsedTime := stopTime - startTime;<br />
  <br />
    WriteLn('IO elapsed time: ' + inttostr(elapsedTime) + ' ms with max of ' + inttostr(ioMax));<br />
    WriteLn(' i: ' + inttostr(i));<br />
    WriteLn(' myLine: ' + myLine);<br />
    result := elapsedTime;<br />
    end;<br />
  <br />
  begin<br />
    intMax := 1000000000;<br />
    doubleMin := 10000000000;<br />
    doubleMax := 11000000000;<br />
    longMin := 10000000000;<br />
    longMax := 11000000000;<br />
    trigMax := 10000000;<br />
    ioMax := 1000000;<br />
  <br />
  <br />
    WriteLn('Start Delphi benchmark');<br />
  <br />
    intArithmeticTime := intArithmetic(intMax);<br />
    doubleArithmeticTime := doubleArithmetic(doubleMin, doubleMax);<br />
   longCountTime := longArithmetic(longMin, longMax);<br />
    trigTime := trig(trigMax);<br />
   ioTime := io(ioMax);<br />
   totalTime := intArithmeticTime + doubleArithmeticTime + longCountTime + trigTime + ioTime;<br />
  <br />
    WriteLn('Total Delphi benchmark time: ' + floattostr(totalTime) + ' ms');<br />
    WriteLn('End Delphi benchmark');<br />
  <br />
    Readln;<br />
  <br />
  end.</description>
			<pubDate>Fri, 09 Jan 2004 23:09:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>delphi suite...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>in the trig function i modify<br />
<br />
i := 0.0;<br />
<br />
by<br />
<br />
i := 0.1;<br />
<br />
because log10 delphi function don't accept 0...<br />
<br />
am1800+ 512mb<br />
result test:<br />
nt aritmetic: 8121ms<br />
double aritmetic: 11627ms<br />
long aritmetic: 112101ms<br />
trigo: 3896ms<br />
io: 3835ms<br />
total: 139580ms</description>
			<pubDate>Fri, 09 Jan 2004 23:12:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Data Access</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Fascinating stuff.  The most interesting thing I've noticed is that the AUTHOR has been one of the few (possibly the only one I didn't read EVERY post) who mentioned the lack of analysis regarding data base access and its importance for &quot;real world&quot; applications.  <br />
<br />
I would LOVE to see the results of a few of these languages hitting some databases.  I know that would open up the very ugly world of data base comparisons, but what the heck.  It would be great to run tests against Access, MS-SQL, DB2 and Oracle to see how each language and it's preferred DB driver does.<br />
<br />
It would be INCREDIBLY interesting to compare ADO.NET with JDBC, ODBC or whatever but I think it would take more resources than a single P4 laptop huh?</description>
			<pubDate>Fri, 09 Jan 2004 23:16:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>To Author: Python benchmark a bit misleading</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>The starting page claims you test 32-bit and 64-bit math. Python doesn't use native 64-bit types on 32-bit architectures if I recall, and promotes all integers that don't fit into a native type into long (arbitrary-precision) integers. Long integers don't use hardware multiplication or specialized algorithms, while all of the other languages do use those, doing Python some injustice. I think this should've been mentioned at the beginning of the article, because what Python is doing isn't really 32-bit math or 64-bit math in the sense that most programmers are used to.<br />
<br />
You could also do much better in some tests by using Numeric Python/numarray, which is designed for these kinds of problems.<br />
<br />
And about Perl vs. Python: both are compiled into intermediate code, in Perl it just has a different form.</description>
			<pubDate>Sat, 10 Jan 2004 00:10:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>To those who do other benchmarks</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Since the hardware you use is different it´s difficult to make  comparations so i suggest to use gcc with the options in the article as baseline.</description>
			<pubDate>Sat, 10 Jan 2004 01:30:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>delphi code</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>to increase delphi performance for long test...<br />
<br />
change<br />
 <br />
longResult := longResult div i;   (112101ms)<br />
<br />
to<br />
<br />
longResult := Trunc(longResult/i); (19958ms )</description>
			<pubDate>Sat, 10 Jan 2004 01:47:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>new langage</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>somebody can translate the code to: Caml, EIFFEL, assembler...<br />
<br />
=======<br />
<a href="http://pages.infinit.net/borland/" rel="nofollow">http://pages.infinit.net/borland/</a></description>
			<pubDate>Sat, 10 Jan 2004 02:38:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>.Net framework Unsigned</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>In the earlier messages, someone complained about a lack of unsigned data types in java and C#. The C# comment appears to be incorrect.<br />
Look at:<br />
System.UInt16<br />
System.UInt32<br />
System.UInt64<br />
System.UIntPtr<br />
<br />
These all claim to be unsigned integers for anyone who needs them</description>
			<pubDate>Sat, 10 Jan 2004 04:10:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Memory</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I'm interested in memory benchmarks. I know Java JITs the code, but what if this JITting causes &gt; 60 MB of memory consumption (when it could be 5 MB, for example)?? The machine would swap a lot (supposing the machine is being heavily used; 60 MB may not be too much, but what if you have 5 x 60 MB apps running?)</description>
			<pubDate>Sat, 10 Jan 2004 04:27:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Long math benchmark for Python vs. others is seriously flawed</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>There is a serious problem with the long math benchmarks, due to python being a dynamically (not statically) typed language.<br />
In C you can say        <br />
  long long int i;<br />
and get a 64-bit signed integer (in C99).<br />
<br />
If you do an operation that makes 'i' too big it overflows, 'i' then contains the incorrect answer, but its type remains the same.<br />
Python works differently to C (and the others). You can use a (plain) integer type, add to it, and instead of overflowing it is dynamically promoted to a long integer.<br />
<br />
$ python<br />
&gt;&gt;&gt; i=1<br />
&gt;&gt;&gt; type(i)<br />
&gt;&gt;&gt; i=i+pow(2,32)<br />
&gt;&gt;&gt; i<br />
4294967297L<br />
&gt;&gt;&gt; type(i)<br />
<br />
Furthermore, the &quot;long integer&quot; does not have 64-bit precision, it has unlimited precision!<br />
For example try<br />
$ python<br />
&gt;&gt;&gt; n = pow(2,63)-1<br />
&gt;&gt;&gt; n<br />
9223372036854775807L<br />
&gt;&gt;&gt; n = n * 10<br />
&gt;&gt;&gt; n<br />
92233720368547758070L<br />
&gt;&gt;&gt; pow(2,128)<br />
340282366920938463463374607431768211456L<br />
&gt;&gt;&gt; pow(2,256)<br />
1157920892373161954235709850086879078532699846656405640394575840079131 29639936L <br />
<br />
This is why in the long math (64-bit integer) benchmark the LongResult for C and Python differ.<br />
C has 776627965<br />
Python has 10000000000<br />
In a integer benchmark the results must match otherwise you are not benchmarking the same operations!<br />
<br />
For the third iteration through the loop, i = 10000000002<br />
longResult = 10000000001 * 10000000002= 100000000030000000002<br />
This is more than a 64-bit signed int can handle and it overflows. Python however calculates the correct results for integers bigger than 64 bits.<br />
<br />
It looks to me like every multiply operation in the long integer test in C overflows 64 bits, so you are benchmarking 1/4 billion 64-bit integer overflows in C (and the others) against 1/4 billion 128-bit integer multiplications in Python, not a fair comparison.<br />
Python is slower but it gives you the correct result!<br />
<br />
A fair benchmark would involve the recoding C (and others) so that they check for 64-bit integer overflow and then do 128-bit arithmetic. Not so easy to do, Python however gives you this for free as its built in.</description>
			<pubDate>Sat, 10 Jan 2004 04:49:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>VB Net -Not</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>VB6 would have been faster.</description>
			<pubDate>Sat, 10 Jan 2004 06:46:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>GCC 3.3.2 benchmark under Linux</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>AthlonXP 1800+<br />
512MB RAM<br />
Gentoo 1.4 compiled with -mcpu=athlon-xp<br />
Linux 2.4.23 + Con Kolivas patchset<br />
# gcc -v<br />
gcc version 3.3.2 20031201 (Gentoo Linux 3.3.2-r4, propolice)<br />
# gcc -march=athlon-xp -mmmx -O3 Benchmark.c -s -o bench_c -lm<br />
Start C benchmark<br />
Int arithmetic elapsed time: 7950 ms with intMax of 1000000000<br />
 i: 1000000001<br />
 intResult: 1<br />
Double arithmetic elapsed time: 7480 ms with doubleMin 10000000000.000000, doubleMax 11000000000.000000<br />
 i: 11000000000.000000<br />
 doubleResult: 10011632717.388229<br />
Long arithmetic elapsed time: 18750 ms with longMin                                                       1410065408, longMax                                                                2<br />
 i:                                                      -1884901888<br />
 longResult:                                                        776627965<br />
Trig elapsed time: 4270 ms with max of 10000000<br />
 i: 10000000.000000<br />
 sine: 0.990665<br />
 cosine: -0.136322<br />
 tangent: -7.267119<br />
 logarithm: 7.000000<br />
 squareRoot: 3162.277502<br />
I/O elapsed time: 1220 ms with max of 1000000<br />
 last line: abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz12345678 90abcdefgh <br />
Total elapsed time: 39670 ms<br />
Stop C benchmark</description>
			<pubDate>Sat, 10 Jan 2004 08:55:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Very bad benchmark: comparing oranges to apples</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>This guy really need to learn to write better benchmarks, because in this one he is comparing oranges to apples (e.g. in Python the I/O benchmark preallocates in memory a list of all the lines to be written to the file) and almost none of the benchmarks test *real* *life* performance (that very often involves complicated data structure and deep call stacks: things like &quot;intResult -= i++;&quot; test only your CPU speed, nothing more).</description>
			<pubDate>Sat, 10 Jan 2004 10:11:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Memory</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>What about, memory footprint comparation .....</description>
			<pubDate>Sat, 10 Jan 2004 16:16:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>gcj vs java-1.4.2</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Kernel 2.6.0-1mdk<br />
glibc-2.3.3-1mdk<br />
<br />
CPU: Athlon 1.2Ghz<br />
Mem: 256MB<br />
<br />
/usr/java/j2sdk1.4.2_01/jre/bin/java -version<br />
java version &quot;1.4.2_01&quot;<br />
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)<br />
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)<br />
<br />
/usr/java/j2sdk1.4.2_01/bin/javac -O -target 1.4 -g:none Benchmark.java<br />
<br />
------<br />
<br />
gcj --version <br />
gcj (GCC) 3.3.2 (Mandrake Linux 10.0 3.3.2-3mdk)<br />
Copyright (C) 2003 Free Software Foundation, Inc.<br />
This is free software; see the source for copying conditions.  There is NO<br />
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
gcj -o Benchmark -O3 -march=athlon -mcpu=athlon -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math -pipe -falign-loops  -falign-functions -falign-jumps --main=Benchmark Benchmark.java<br />
<br />
<br />
/usr/java/j2sdk1.4.2_01/jre/bin/java -server Benchmark<br />
Start Java benchmark<br />
Int arithmetic elapsed time: 10621 ms with max of 1000000000         [12:02:26]<br />
 i: 1000000001<br />
 intResult: 1<br />
Double arithmetic elapsed time: 17518 ms with min of 1.0E10, max of 1.1E10<br />
 i: 1.1E10                                                           [12:27:35]<br />
 doubleResult: 1.00116327174955E10<br />
Long arithmetic elapsed time: 34736 ms with min of 10000000000, max of 11000000000<br />
 i: 11000000000<br />
 longResult: 776627965<br />
Trig elapsed time: 118742 ms with max of 1.0E7<br />
 i: 1.0E7<br />
 sine: 0.9906646477361263<br />
 cosine: -0.13632151600483616<br />
 tangent: -7.267118770165242<br />
 logarithm: 16.118095550958316<br />
 squareRoot: 3162.2775020544923<br />
IO elapsed time: 6665 ms with max of 1000000<br />
 i: 1000001<br />
 myLine: abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz12345678 90abcdefgh <br />
Total Java benchmark time: 188282 ms<br />
End Java benchmark<br />
<br />
<br />
<br />
./Benchmark (gcj)<br />
Start Java benchmark<br />
Int arithmetic elapsed time: 10632 ms with max of 1000000000               [12:28:01]<br />
 i: 1000000001<br />
 intResult: 1<br />
Double arithmetic elapsed time: 6022 ms with min of 1.0E10, max of 1.1E10<br />
 i: 1.1E10<br />
 doubleResult: 1.0011632717389214E10<br />
Long arithmetic elapsed time: 25322 ms with min of 10000000000, max of 11000000000<br />
 i: 11000000000<br />
 longResult: 776627965<br />
Trig elapsed time: 18140 ms with max of 1.0E7<br />
 i: 1.0E7<br />
 sine: 0.9906646477361245<br />
 cosine: -0.1363215160048489<br />
 tangent: -7.267118770165242<br />
 logarithm: 16.118095550958316<br />
 squareRoot: 3162.2775020544923<br />
IO elapsed time: 13913 ms with max of 1000000<br />
 i: 1000001<br />
 myLine: abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz12345678 90abcdefgh <br />
Total Java benchmark time: 74029 ms<br />
End Java benchmark</description>
			<pubDate>Sat, 10 Jan 2004 17:32:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Hazards of microbenchmarking</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>If your real-world application resembles this benchmark, then the results &gt;might&lt; be useful.<br />
<br />
For any floating point codes I have seen (Orbit/Attitide determination, weather simulation, and so forth), accurate results are more important than sheer speed.  See the evaluation on this bug report for a discussion of wildly inaccurate results from simple-minded calculations:<br />
<br />
<a href="http://developer.java.sun.com/developer/bugParade/bugs/4807358.html" rel="nofollow">http://developer.java.sun.com/developer/bugParade/bugs/4807358.html</a> <br />
<br />
<br />
As mentioned in the Evaluation: if you don't care about accurate, consistent results, why do you need the calculation at all?</description>
			<pubDate>Sat, 10 Jan 2004 18:50:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Java Trig Performance</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>By altering the values given to sin, cos, and tan from 0 - trigMax and normalizing then to 0 - 2PI, Java 1.4.2_03 benchmark improves from 57 secs to 10 secs.  This change provides a more even distribution of radian values than does the original 0 - 10M.  It would seem that the cost of certain radian values for the trig functions is not evenly distributed in java.<br />
<br />
I wonder if it is the same for all languages?<br />
<br />
Curt</description>
			<pubDate>Sat, 10 Jan 2004 21:36:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>MS C++ 6.0   vs   MS C++ .net (2003)</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I was able to test both the 6.0 and .net2003 compilers on a PIII 733 Win2000 box.<br />
<br />
Best times of three runs.  Runs varied no more than 2%.<br />
<br />
6.0<br />
Int 16183<br />
Double 22742<br />
Long 41220<br />
Trig 5928<br />
I/O 5148<br />
Total 91221<br />
<br />
.net (new unmanaged project)<br />
Int 16183<br />
Double 23423<br />
Long 41360<br />
Trig 5888<br />
I/O 5258<br />
Total 92112</description>
			<pubDate>Sat, 10 Jan 2004 22:13:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE:  Lots of other bottlenecks</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&gt;&gt; the latest Hotspot does an excellent job getting rid of<br />
&gt;&gt; array bounds checking in many instances<br />
<br />
How do you know that Hotspot does an excellent job of eliminating ABC's? Sun does not tell us the means by which it determines whether ABC's can be eliminated, nor do they provide a mechanism telling us where ABC's have successfully been eliminated (which would allow us to do some reverse engineering and figure out in what scenarios ABC's can be eliminated)... this leads to a question:<br />
<br />
Can code be written in a way which would make the compiler better able to eliminate ABC's? I'm not quite sure what this would entail, but I'm curious as to whether or not it can be done.</description>
			<pubDate>Sat, 10 Jan 2004 22:14:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>c on cygwin</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I don't know if this is just me, but i've tried several times compiling c code in cygwin e the same c code outside cygwin(linux for exemple) and it seems that gcc in cygwin suffers some lag.<br />
So perhaps, the benchmark of C was not that right</description>
			<pubDate>Sat, 10 Jan 2004 23:13:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Worthless Benchmark</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>A lang. benchmark is not going to be very useful in this context.  As numerous people have pointed out, you need a benchmark that will simulate more of what you need your code todo in a given project, to see if there's any performance benefit from switching to another lang.  This will generally, be different for each project.  Not to mention, this is more of a compiler benchmark, then a lang. benchmark, and GCC's claim to fame, is portabilty, not optimization, especially for non-x86 arch's (Sun's Compilers, and SGI's MIPSpro compilers will give you a binary that usually performs about %300-%500 Better than a gcc built binary, since I don't use x86 hardware much, I am not an expert in what compiler you should use to benchmark on that platform, but I would imagine Intel's compiler to be leaps and bounds ahead of gcc in optimization.  <br />
<br />
Thus the blanket assurtion that C shouldn't be used for speed anymore is wrong, and then adding that the code is less maintainable, is absurd.   People have been maintaining C source far longer than most other languages in such wide use (Fortran/etc. the execption, and they still have their place as well).  The Best lang is often times, the one the programmer is most familiar with, but C can generally be optimized much better than other languages (C++ included.), although some languages, like fortran, are easier for the compiler to parallize for MP's (take into account SGI's -apo options) for multiple reasons beyond the scope of this comment.</description>
			<pubDate>Sun, 11 Jan 2004 04:31:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Also</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>The author needs to give the machine specs, compilers and versions used, source code, and the flags passed to the compiler... for example on irix I might compile like<br />
<br />
cc -Ofast=ip30 -TARG:platform=ip30:isa=mips4:processor=r14000 etc. etc. etc.</description>
			<pubDate>Sun, 11 Jan 2004 04:33:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE:RE: gcc and python in their native environments?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Actually perl is compiled. It's just that it normally isn't stored like a compiled binary. Interpreting languages are usually iterpreted on a line by line bases, while all of the perl code is read and converted to something machine executable before a perl program starts doing some useful work.<br />
<br />
At least in some unix environments it is possible to dump the compiled perl binary to create a true executable.</description>
			<pubDate>Sun, 11 Jan 2004 06:13:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>VB file i/o can be easily improved,</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Hi,<br />
<br />
I was very surprised to find VB.NET's bad file i/o performance especially compared to C# because they should indeed produce close results.<br />
And I just checked the VB benchmark Code and the reason was evident. The author used FileOpen, LineInput functions which were available as keywords (open , line input, close etc.) in VB6. In .NET word, MS has provided them as functions to make migration simpler however at the cost of performance. <br />
Use of functions from System.IO namespace (as C# code must be using) should give the same performance for VB.NET.<br />
<br />
-Vinay.</description>
			<pubDate>Mon, 12 Jan 2004 06:31:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>This is very funny &amp;quot;benchmark&amp;quot; :)</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Author(s) of this benchmark must be drunk during the new-year-days... Using GCC from Cygwin as a reference is the most ridiculous thing some &quot;programmer&quot; can do. <img src="/images/emo/smile.gif" alt=";)" />  No comment.</description>
			<pubDate>Mon, 12 Jan 2004 08:04:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>This benchmarks are valid ONLY on windowz</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>the result only show us Windowz is an ill platform, it is clear that C is the fastest on Linux <img src="/images/emo/smile.gif" alt=";)" /></description>
			<pubDate>Mon, 12 Jan 2004 13:29:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>some links about java strict-fp</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>as has been mentioned by others, the java performance is probably due to strict floating point ... here are some links on that:<br />
<br />
<a href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html" rel="nofollow">http://java.sun.com/docs/books/jls/second_edition/html/expressions....</a> <br />
<br />
<a href="http://java.sun.com/docs/books/vmspec/2nd-edition/html/Concepts.doc.html#24465" rel="nofollow">http://java.sun.com/docs/books/vmspec/2nd-edition/html/Concepts.doc...</a> <br />
<br />
<a href="http://www.jcp.org/en/jsr/detail?id=84" rel="nofollow">http://www.jcp.org/en/jsr/detail?id=84</a></description>
			<pubDate>Mon, 12 Jan 2004 19:44:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>On Java trig performance</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>See - <a href="http://forum.java.sun.com/thread.jsp?forum=31&amp;thread=481284&amp;message=2244210#2244210" rel="nofollow">http://forum.java.sun.com/thread.jsp?forum=31&amp;thread=481284&amp...</a></description>
			<pubDate>Tue, 13 Jan 2004 14:20:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>
	</channel>
</rss>
