Skip to content.

Manageability

Sections
Personal tools
You are here: Home » blog » archive » C# code

Comment

Above in this comment thread: The Ultimate Java Versus C# Benchmark

C# code

Posted by Anonymous User at 2003-10-23 04:41 AM

I am sorry to say, but your c# code wouldn't even compile, let alone execute. For your information if you tried to compile the c# code it would complain on switch/case statement, because each case statement in c# would have to finish with the break statement.

Ignore the comment above

Posted by Anonymous User Anonymous User at 2003-10-23 04:42 AM

sorry, by bad. I didn't realise that it actually uses return statement on each case statement. Again apologies.

C# sample compiles

Posted by Anonymous User Anonymous User at 2003-11-03 03:24 AM

I have to bitterly disagree with the comment. I just copy and paste into a file the C# sample and then compiled it (using csc.exe and framework 1.1 but I guess there's non difference with previous versions of the software) and it all compiled fine. So I wonder if the user who wrote the comment actually tried to compile and test the sample code in C#. This is the benchmark result for the first line of the test (I'm still waiting for the next ones) as provided by the quoted framework version and a AMD Athlon 2000+ with 1Gb memory and 120Gb hard disk as a test platform:

found AAAGTAAGCC at 1000000 it took 90 miliseconds

It's quite interesting to notice that the CPU usage during the execcution of this sample was 100% most of the time.

So this test is a valid one at list at the point that it can be reproduced by anyone having access to .Net framework and Java SDK.

Have a nice day,

ACL

C# code compiles

Posted by Anonymous User Anonymous User at 2003-11-12 07:27 AM

Oh yeah, C# code does compile over the .NET Framework 1.1.4. But, despite of the "Unhandled Exception: OutOfMemoryException" shown, the system just freezes and never returns (even using 100% of CPU while processing). :D

1089707353

Posted by Anonymous User Anonymous User at 2004-07-13 03:29 AM

false ! A switch can have a return instead of a break ! It compiles on my computer

 
 

Powered by Plone

This site conforms to the following standards: