|
-
Mar 5th, 2021, 01:11 AM
#11
Banned
Re: Simple and fast, lightweight HashList-Class (no APIs)
 Originally Posted by Schmidt
Update: The latest version is contained in the Zip below, with the following benefits:
- better performance
- RemoveByIndex and Remove (by Key) is now included
- variable Keys (incl. Objects), which can also be mixed
Here's the result of a performance-comparison to the MS-Scripting.Dictionary (native compiled, all options checked):
Ok, here the Zip with the new version (including the little PerformanceTest).
cHashDWithRemove.zip
Olaf
I just tried to copy this post code and try to build it to DLL and try it in VBA environment, the result of hash table runs slower than Ms's Dictionary !!!
Also on VB6 try with: Const Count As Long = 1048500
Code:
Sub HashTable_Dictionary()
Const Count As Long = 1048500
Dim SD As Scripting.Dictionary
Dim i As Long, T@
Set SD = New Scripting.Dictionary
Dim HD As cHashTable
Set HD = New cHashTable
T = msTimer
For i = 1 To Count
SD.Add "khdkjhjhkjhkhkhkhkjhk " & i, i
Next
Debug.Print "Dictionary - AddItems", msTimer - T, SD.Count
T = msTimer
HD.ReInit Count
For i = 1 To Count
HD.Add "khdkjhjhkjhkhkhkhkjhk " & i, i
Next
Debug.Print "HashTable - AddItems", msTimer - T, HD.Count
End Sub
Attachment 180419
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|