On Mon, May 21, 2007 at 01:08:13AM -0700, William Lee Irwin III wrote:
On Mon, May 21, 2007 at 11:27:42AM +0200, Nick Piggin wrote:
It doesn't need to. If what's in the cache is uniformly distributed,
you get that result for spatial locality. From there, it's counting
cachelines.
On Mon, May 21, 2007 at 01:08:13AM -0700, William Lee Irwin III wrote:
On Mon, May 21, 2007 at 01:08:13AM -0700, William Lee Irwin III wrote:
The average interval ("run") length is (n+1)/(n-k+1) - 1/C(n,k), so for
that to be >= 8 you need (n+1)/(n-k+1) - 1/C(n,k) >= 8 which also happens
when (n+1)/(n-k+1) >= 9 or when n >= (9/8)*k - 1 or k <= (8/9)*(n+1).
Clearly a lower bound on k is required, but not obviously derivable.
k >= 8 is obvious, but the least k where (n+1)/(n-k+1) - 1/C(n,k) >= 8
is not entirely obvious. Numerically solving for the least such k finds
that k actually needs to be relatively close to (8/9)*n. A lower bound
of something like 0.87*n + O(1) probably holds.
On Mon, May 21, 2007 at 01:08:13AM -0700, William Lee Irwin III wrote:
On Mon, May 21, 2007 at 11:27:42AM +0200, Nick Piggin wrote:
Did you get cut off here?
-- wli
-