I've made a VB .Net application that use arrays, a lot. I'm optimizing my application for speed because it is very slow, specially in the areas where arrays are massively used.
I've searched in google and books and i found technics to speed up array search but none of them referenced multi-dimensional arrays, so the question i've been making for months remains:
How can i speed up multi-dimensional array search?
As an example i have the function listed bellow that is inserted in one of the code areas where the windows task manager blows of scale and the cpu usage reaches 100% and my application hangs for while (enough time for the picturebox to present a red cross instead of the image)
Can You help?
Public Function returnPoint(ByVal x As Integer, ByVal y As Integer) As String
Dim strReturn As String = ""
Dim intCounter As Integer
For intCounter = 0 To UBound(ArrayPontos) - 1
If (ArrayPontos(intCounter).lngValueY = y) AndAlso (ArrayPontos(intCounter).lngValueX = x) Then
strReturn = ArrayPontos(intCounter).strPointName
My thanks in Advanced