thomas-rasmussen / sas_macros

SAS macros
Creative Commons Zero v1.0 Universal
5 stars 4 forks source link

hash_match: Find number of elements in hash object using obj.num_items hash attribute #53

Closed thomas-rasmussen closed 2 years ago

thomas-rasmussen commented 2 years ago

Can the number of elements in the hash table be updated every time a control is removed using obj.num_items? Find documentation on obj.num_itmes. If this can be used to reassess the number of elements in the hash object everytime a control is removed, the matching could be done much more efficient when matching with replacement.

https://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Regina-User-Group/ShaunKaufmann-IntroHash-Sept2013.pdf

thomas-rasmussen commented 2 years ago

Does not help (probably also the conclusion that was made when the macro was originally made). We can use the method to update the number of elements in the hash table, but the keys are still values from 1 to the original n, making it impossible to find higher key values if n is updated.