Hashtable implementation for Delphi 5

后端 未结 9 1514
名媛妹妹
名媛妹妹 2021-02-14 23:37

Do you know a good and free Hashtable imlementation for Delphi 5 ?

I need to organize a huge amount of data in a hastable and I am bit worried about memory leak issues t

相关标签:
9条回答
  • 2021-02-15 00:12

    Apart from the actual hash-table implementation, the hash-function being used itself is also important.

    A good one is a hash function from Bob Jenkins, read his paper here.

    This algorithm was improved upon recently for cases where the input is DWord-sized (See the C-version of it here). This version is faster, and results in two 32-bit hash-values instead of one. (This second hash-value could be used to speed up in-bucket selection for example.)

    For those interested, I could paste the Delphi-translation here? (It's about 170 lines of code.)

    0 讨论(0)
  • 2021-02-15 00:13

    Peter Below just posted a rework of something he did to the Embarcadero newgroups in the public.attachments. There's something under his profile on the CodeGear site at http://cc.codegear.com/Item/24825 taht describes it.

    0 讨论(0)
  • 2021-02-15 00:14

    You can try my GpStringHash. Guaranteed no memory leaks, but works only with strings. I think it should work in D5.

    0 讨论(0)
提交回复
热议问题