![]() |
|
|
|||||||
![]() |
MCSD - C# or VB.NET - not exaclty the same performance |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
MS or anyone still claims that C# and VB.NET generate the exact same IL code
? http://www.osnews.com/story.php?news_id=5602&page=3 Daniel P. |
|
|
|
|
#2 |
|
Posts: n/a
|
On Tue, 20 Jan 2004 09:56:32 -0600, "Daniel P."
<> wrote: >MS or anyone still claims that C# and VB.NET generate the exact same IL code >? > >http://www.osnews.com/story.php?news_id=5602&page=3 > > Hi Interestingly enough there is a difference in code for vb and C# that he used for the IO test. with his code I got: I/O elapsed time: 46497 ms with a max of 1000000 i: 1000000 readLine: abcdefghijklmnopqrstuvwxyz1234567890abcefghijklmno pqrstuvwxyz12345678 90abcdefgh With a few changes to the IO function[1], the result is this: I/O elapsed time: 9404 ms with a max of 1000000 i: 1000000 readLine: abcdefghijklmnopqrstuvwxyz1234567890abcefghijklmno pqrstuvwxyz12345678 90abcdefgh The problem is that he is using old vb6 (And below) functions which are much slower. Since the IO test was the main difference between VB.Net and C#, there doesn't seem to be any difference anymore. Regards, Jens Andersen [1] Dim strWriter As New IO.StreamWriter(fileName) Do While (i < ioMax) strWriter.WriteLine(myString) i += 1 Loop strWriter.Close() Dim strReader As New IO.StreamReader(fileName) i = 0 Do While (i < ioMax) readLine = strReader.ReadLine() i += 1 Loop strReader.Close() Jens Andersen |
|
|
|
#3 |
|
Posts: n/a
|
plus if a remember my first seminar on .net... at the point where beta 2 was
released... ms only claimed that the msil generated will the equivalent. if you look at language comformance across different languages... it does vary... -- Regards, HD Once a Geek.... Always a Geek "Jens Andersen" <> wrote in message news:... > On Tue, 20 Jan 2004 09:56:32 -0600, "Daniel P." > <> wrote: > >>MS or anyone still claims that C# and VB.NET generate the exact same IL >>code >>? >> >>http://www.osnews.com/story.php?news_id=5602&page=3 >> >> > Hi > Interestingly enough there is a difference in code for vb and C# that > he used for the IO test. > with his code I got: > I/O elapsed time: 46497 ms with a max of 1000000 > i: 1000000 > readLine: > abcdefghijklmnopqrstuvwxyz1234567890abcefghijklmno pqrstuvwxyz12345678 > 90abcdefgh > > With a few changes to the IO function[1], the result is this: > I/O elapsed time: 9404 ms with a max of 1000000 > i: 1000000 > readLine: > abcdefghijklmnopqrstuvwxyz1234567890abcefghijklmno pqrstuvwxyz12345678 > 90abcdefgh > > The problem is that he is using old vb6 (And below) functions which > are much slower. > Since the IO test was the main difference between VB.Net and C#, there > doesn't seem to be any difference anymore. > Regards, > Jens Andersen > > [1] > Dim strWriter As New IO.StreamWriter(fileName) > Do While (i < ioMax) > strWriter.WriteLine(myString) > i += 1 > Loop > strWriter.Close() > Dim strReader As New IO.StreamReader(fileName) > i = 0 > Do While (i < ioMax) > readLine = strReader.ReadLine() > i += 1 > Loop > strReader.Close() > > Hermit Dave |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| image (jpg,bmp,gif, etc.) convert to equivalent binary representation using vb.net? | archieSupremo | Software | 0 | 09-06-2009 12:20 PM |
| Best CPU Cooler Performance LGA1366 Q2-2009 | Admin | Front Page News | 0 | 08-05-2009 04:56 PM |
| Windows 7 Beta Performance | Admin | Front Page News | 0 | 01-16-2009 02:53 PM |
| Does RAID0 Really Increase Disk Performance? | Silverstrand | Front Page News | 0 | 11-02-2006 02:09 AM |
| Re: Hard drive performance question | MF | A+ Certification | 0 | 12-10-2005 01:55 AM |