Linked by Christopher W. Cowell-Shah on Thu 8th Jan 2004 19:33 UTC
General Development This article discusses a small-scale benchmark test run on nine modern computer languages or variants: Java 1.3.1, Java 1.4.2, C compiled with gcc 3.3.1, Python 2.3.2, Python compiled with Psyco 1.1.1, and the four languages supported by Microsoft's Visual Studio .NET 2003 development environment: Visual Basic, Visual C#, Visual C++, and Visual J#. The benchmark tests arithmetic and trigonometric functions using a variety of data types, and also tests simple file I/O. All tests took place on a Pentium 4-based computer running Windows XP. Update: Delphi version of the benchmark here.
Permalink for comment
To read all comments associated with this story, please click here.
RE: Raynier and LinuxBuddy
by RoyBatty on Thu 8th Jan 2004 22:39 UTC

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.

You can add C# into that mix too.

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.

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.