[fpc-pascal] Effective memory allocation

Xiangrong Fang xrfang at gmail.com
Tue Nov 4 02:29:19 CET 2014


2014-11-04 6:35 GMT+08:00 Nico Erfurth <ne at erfurth.eu>:

>
> 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.
>

​I didn't think of things like cache and TLB misses. Because I try to use
BloomFilter and HASH to avoid repeated calculation ​and/or lookups which
are time consuming. So, I don't think it will harm performance, unless
bloom filter lookup is slower than the calculation, am I right?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20141104/bc9a7965/attachment.html>


More information about the fpc-pascal mailing list