<johendak@gmail.com> wrote:
+---------------
| Can anyone tell me how to determine this accurately for a PC?
| Especially things like time taken to fetch something from L1 cache?
+---------------
One popular set of microbenchmarks for this sort of thing is "LMbench":
http://www.bitmover.com/lmbench/
http://www.bitmover.com/lmbench/whatis_lmbench.html
http://www.bitmover.com/lmbench/why_lmbench.html
As the latter page notes, LMbench includes:
* Memory latency results
The memory latency test shows the latency of all of the system
(data) caches, i.e., level 1, 2, and 3, if present, as well as
main memory and TLB miss latency. In addition the sizes of the
caches can be read off of a properly plotted set of results.
The hardware folks like this. This benchmark has found bugs in
operating system page coloring schemes.
-Rob
p.s. Disclaimer: I know the original author. He taught me a lot
about playing 9-ball... ;-} ;-}
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607