Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, I was looking for some array.bas to improve my projects and this is awesome! But I use a function to sort array that I came up with a long time ago that is way faster than the one here. As a thank you for this project, I'd like to contribute with the arraySorterSDim (for single dim arrays) and the ArraySorter (for two dim arrays)
You can compare the performance with a simple test:
Function getFaster()
Dim myArr(5000) As Variant
Dim m1Arr() As Variant
Dim m2Arr() As Variant
Dim t1 As Double
Dim i As Double
For i = 0 To 5000
myArr(i) = Rnd
Next i
t1 = Time
m1Arr = ArraySort(myArr)
Debug.Print "time for m1:", Time - t1
t1 = Time
m2Arr = arraySorterSDim(myArr)
Debug.Print "time for m2:", Time - t1
End Function
Wich gave me:
time for m1: 00:00:21
time for m2: 00:00:09