Framework 2.0 array redim unsatisfactory performance



Hello,

I was just testing VB.Net on Framework.Net 2.0 performance when I run into
the this problem.
This trivial code attached below executed hundreds, if not thousand times
faster in VB 6.0 than in .Net environment, under VS 2005 Beta 2. Does anyone
have any idea whether this will be addressed in the final release?

Thanks,
Tomasz

Public Sub Main()
Dim foos() As Long

Dim n As Long
n = 100000
Dim i As Long
For i = 1 To n
ReDim Preserve foos(i)
foos(i) = i
Next i
Debug.Print(foos(1000))
End Sub


.



Relevant Pages

  • Create an object
    ... I assume your parameters are of the correct type ... > Public Sub CustomPrincipal(ByVal identity As ... >the error message: ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: webrequest - server blocks
    ... I tried it with this code, and it gave me back the html page in the string. ... Public Sub main ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Simple asp.net programing question
    ... some external code that would be located in one location only for ease of ... Public Sub Page_PreInit ... Dim page As Page ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Running Visio macros from Excel
    ... Program expects there is a code in the MainModule like next, ... Public Sub CustomCommandHandler ... Msgbox IValue ... Prev by Date: ...
    (microsoft.public.visio.developer.vba)
  • Postback/ EventArgs Problem...
    ... Argument not specified for parameter e of Public Sub UploadDate(Sender As ... Dim objUpload As New UploadCnt ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)

Loading