Not a big surprise to me. There was a guy from USC that did the same thing a few years back with Java and C++, and they were pretty competitive in everything except trig functions. Also, the MS C++ compiler is no speed demon either. The C++ hash table implementation is really bad! How did they bork that one? You would think that people would be howling so loudly that it would have been fixed within a month.
I found the GenericSum method amusing...
Code:
public static T GenericSum<T, Math>(List<T> list, Math M) where Math : IMath<T>
{
T sum = M.Zero;
for (int i = 0; i < list.Count; i++)
sum = M.Add(sum, list[i]);
return sum;
}
Five lines of code for the method, not including creating the list and calling, AND it only works on sums.
How can people tolerate programming in these languages?! =)
Code:
CL-USER> (reduce #'+ (list 1 2 3 4 5))
15
I think that I'll stick to the ancient languages...
