Hi there, in the thread
http://is.gd/4EMT8 David and I agreed that M4RI should have a better, more robust and cross- platform mechanism to check for cache sizes. Thus I wrote a little C program to check for the cache size using timings of random-ish memory access. The program is available at: http://sage.math.washington.edu/home/malb/cache.c On my Core 2 Duo and on my Opteron (both running Linux 64-bit) it does report correct sizes. So far so good. On sage.math it reports L3 cache size instead of L2 but I guess that this is probably what we want anyway (well, L2 is 3MB which I don't check explicitly since I only check powers of two) I'd appreciate if those people on this list who have different hardware or software (OSX, Solaris, PPC, Sparc) could compile the program and report back whether the program reports correct sizes for them. To compile and run: gcc -std=c99 -O3 cache.c -o cache ./cache Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://www.informatik.uni-bremen.de/~malb _jab: martinralbre...@jabber.ccc.de --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---