Skip to content

Commit a8a3cab

Browse files
committed
readme details
1 parent 290fd91 commit a8a3cab

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

entries/ghatem-fpc/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,6 @@ Using performance profiler ValGrind, it identified that:
218218
- surprisingly, 9% of the time is spent on looking for the #13 (new-line) character
219219

220220
I implemented my own Dictionary class consisting of two arrays. We compute the modulus of the incoming key (Cardinal) to fit it in the correct bucket. A first attempt at collision resolution was to store as values a TList, but performance was worse than the generic TDictionary. Next attempt was a linear probing, with circular indexing in case the index goes out of bounds. Performance improved from 35s to 30s. Will later try quadratic probing, as it apparently reduces clustering.
221+
222+
edit:
223+
quadratic probing improved performance even further. we could probably do better with 2-level hashing, but finding such a hash function is going to take a lot of trials, this is probably acceptable results

0 commit comments

Comments
 (0)