Determing cache sizes -- request for testing
Don
nospam at nospam.com.au
Wed Sep 10 02:41:40 PDT 2008
To implement efficient memory-intensive operations (memcpy, array
operations, matrix multiplication, etc), you really need to know the
sizes of the data caches.
Although most modern CPUs provide methods to determine the sizes of
their built-in caches, it's a complete pigs breakfast. There are
multiple complicated methods, and documentation is scant.
I've written some code to make this mess usable, and provide what you
really want. For each level of cache, the code provides size in KB, ways
of associativity, and the cache line size.
The attached code should eventually become part of std.cpuid, and an
equivalent module in Tango. But, it needs significant further testing.
Please compile and run the code, and report the results. Any results
would be useful, but particularly valuable would be:
(1) Multicore AMD machines;
(2) Early AMD machines (K6 or earlier).
(3) Early Intel machines;
(4) anything from another manufacturer.
(5) any crashes or obvious bugs.
Public domain.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cache.d
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080910/d9ce29d6/attachment.ksh>
More information about the Digitalmars-d
mailing list