Go Back   Velocity Reviews > Newsgroups > MCSD
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

MCSD - C# or VB.NET - not exaclty the same performance

 
Thread Tools Search this Thread
Old 01-20-2004, 03:56 PM   #1
Default C# or VB.NET - not exaclty the same performance


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.
  Reply With Quote
Old 01-20-2004, 05:19 PM   #2
Jens Andersen
 
Posts: n/a
Default Re: C# or VB.NET - not exaclty the same performance
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
  Reply With Quote
Old 01-20-2004, 10:59 PM   #3
Hermit Dave
 
Posts: n/a
Default Re: C# or VB.NET - not exaclty the same performance
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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46