hermann on Thu, 29 Jun 2023 20:03:07 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Can PARI code be forced to run in 32MB L3 cache, mostly without RAM?


There are 31 hits for "cache", but none helped me to answer subject question:
https://pari.math.u-bordeaux.fr/pub/pari/manuals/2.15.1/libpari.pdf

If it is possible to restrict most part of computations to L3 cache, does one need to restrict parisize and parisizemax to that value as well?
Or lower?

My 7600X CPU has these caches:
https://github.com/Hermann-SW/7600X#details-of-pc
L1 Cache  384KB
L2 Cache  6MB
L3 Cache  32MB

Under Linux, how can I tell whether program runs mostly from cache and not from RAM?


My only C++ PARI code sofar:
https://github.com/Hermann-SW/RSA_numbers_factored/blob/main/c%2B%2B/sqrtm1.smallest_known_1million_digit_prime.cc#L68-L93

I could reduce input prime size down from 1million digits for testing to fit into L3 cache.


Regards,

Hermann.