You are not logged in.
Has it been measured yet? Memory usage/Speed etc? Is there clear measurable menefit?
-Tee-
Offline
From the regression tests timing of mORMot and our private apps, when number of items increases, it is as fast as "and (PowerOfTwoSize-1)" and noticeably faster than "mod BigSize".
In conjunction with a prime size, it enhances distribution.
And using less memory than power of two, since our increasing _PRIMES[] list has more linear increments.
Note: I discovered that Delphi's TDictionary not only store the hashcode in the table (which we did, but don't anymore since it was not mandatory and saves 32-bit per slot), but it stores the value in the hash table, which is usually much bigger than the items count (typically twice), so is actually wasting a lot of memory if the value is some big record...
Of course, storing the data allows to bypass the indexes adjustment after deletion - as we must do within our hash table. But with our branchless AVX2 code - see DynArrayHashTableAdjust - maintaining the indexes is not a bottleneck anymore. So best of both worlds, I hope.
Offline
thanks for info`?
Offline