Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

cache size

Name: Anonymous 2009-03-24 1:24

I'm trying to write a program in C that spits out data that I can use to find the size of my L1 cache (theoretical experiment, I know I can just look it up). It isn't working, though.

Basically what I'm doing is I'm allocating arrays of incrementally larger sizes, filling them with random numbers, and then accessing each of the elements in the array, in order, 10,000 times in a row, and timing how long that takes. The concept is that once the array is larger than my L1 cache size, the average access time should suddenly jump higher. However, I'm not seeing this and am getting a constant increase in access time from array size 1K to 4MB. (my actual L1 cache size is 64K).

Anyone care to point out where I'm fucking up?

Name: Anonymous 2009-03-24 12:34

>>21
That analogy is flawed.

Clay figurines are judged by their aesthetic appeal, if you insist on judging CPU architectures the same way then yes, x86 is ugly, has all that arcane unelegant cbw/cwd/wtf instructions, so '78 LISP machine prototype is undoubtedly prettier.

If however you are a sane person and use more realistic metrics, such as execution speed, transistor count, cost-effectiveness ultimately, then you have to provide some expert data that would show that x86 not only looks ugly because of the accumulated sedimentary layers of crap, but also is actually significantly worse in respect to this practical metrics because of it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List