Web Log of Aleksey Nudelman: Thoughts on Software Architecture

Analysis and Review of Microsoft Technologies for IT Managers, Architects and Developers

Saturday, September 11th

Is Open Directory Really Open?


If you ever visited C# Tools directory http://dmoz.org/Computers/Programming/Languages/C-sharp/Tools/, you probably noticed that the sites listed there do not reflect the key tools used by C# programmers. I have contacted DMOZ and proposed a few popular C# tools (VC#, ildasm, devpartner studio) DMOZ replied that "...the URLs are inappropriate for the category.."
Given the poor quality of links in DMOZ, it is unfortunate that Google gives higher ranking to sites listed in DMOZ.
aleksey on 09.11.04 @ 11:02 PM PST [link]


Wednesday, September 8th

Benchmarking Java and C#: loop optimization is better in C#


For a long time, I wanted to benchmark C# and Java. It is well known that loop optimization in .NET 1.X is inferiour to VC++ but how does C# (v1.1) compare to java 1.4.2.05?
Here is a test
//C# code:
using System;
class loop {
public static void Main() {
DateTime d=DateTime.Now;

int result=2;
for(long i=0;i<2100000000;i++)
{
for(int j=0;j<10;j++)
result=3;

}
DateTime d2=DateTime.Now;
Console.WriteLine((d2.Ticks-d.Ticks)/10000);
}
}

//Java code
class loop {
public static void main(String[] args) {
java.util.Date d = new java.util.Date();

int result=2;
for(long i=0;i<2100000000;i++)
{
for(int j=0;j<10;j++)
result=3;

}
java.util.Date d2=new java.util.Date();
System.out.println(d2.getTime()-d.getTime());
}
And the results are:
Java: 58.3 seconds
C#: 3.8 seconds
C# is much faster to execute. However, .NET loading time, not measured in this test, is always a few seconds longer than Java's.
aleksey on 09.08.04 @ 08:30 PM PST [link]



  Home
  Archives
Phishing Inspector is  available

Copyright© 2006 Aleksey Nudelman