Signature (Visual Basic / VBA)
Public Sub Resize( _
ByVal vNumHeaders As Long _
, ByVal vNumBuckets As Long _
)
Code Example
Assuming
Dim htTemp As New HashTable
for example
htTemp.Resize 1024, 8192
Parameters
| Parameter | Description |
|---|---|
| vNumHeaders | The number of header buckets in the new hash table. |
| vNumBuckets | The number of data buckets in the new hash table. |
Notes & Version History
| Summary | You can improve the performance of some hash table operations by calling the Resize method to create a hash table that is large enough to store the maximum number of entries you expect will be required. This will allow you to avoid the automatic expansion that occurs whenever the hash table becomes full. |
| Example | Resize the hash table to make room for approximately 1,024 header and 8,192 data buckets: |
| v1.5 Change | Changed this method to allow you specify both the number of header buckets and data buckets to be allocated. |