[fpc-pascal] Effective memory allocation

Nico Erfurth ne at erfurth.eu
Mon Nov 3 23:35:01 CET 2014


>         Hi All,
>         I am programming a Bloom Filter and need a high-performance way to
>     On what platform are you doing this ?
> ​I am programming on Linux, but it will be used on both Windows and
> Linux, Windows is the primary target.​

Well, the first thing you should ask yourself is "Do I REALLY need such
a large bloom filter". Everything larger than the last level cache will
seriously harm your performance as you are going to trigger a lot of
cache and TLB misses. In general you should target for typical L1-Cache
sizes (16-32KByte) or if REALLY necessary L2-Cache-sizes
(256KByte-32MByte). Everything above that will make the performance go
down rapidly, especially in hashing-application the CPU can't prefetch
data properly as the access-patterns are erratic.


More information about the fpc-pascal mailing list