I want to reduce it to 4 k in the first step. Is it better to first reduce the offset-width or the index-width? To get 4k I can write:
index-width: 7
offset-width: 5
or
index-width: 6
offset-width: 6
Both result in a cache size of 4k.
Which is the preferred way to reduce the cache size or doesn't it matter which value is reduced?
I want to reduce it to 4 k in the first step. Is it better to first reduce the offset-width or the index-width? To get 4k I can write:
index-width: 7
offset-width: 5
or
index-width: 6
offset-width: 6
Both result in a cache size of 4k.
Which is the preferred way to reduce the cache size or doesn't it matter which value is reduced?
Christian
I would think that more cache lines would probably be better than bigger cache lines so the 5/7 setting might work better. However, it is very dependent on your code. Try both and see which works best. Sorry for being evasive but it really does depend on the application.
I would think that more cache lines would probably be better than bigger cache lines so the 5/7 setting might work better. However, it is very dependent on your code. Try both and see which works best. Sorry for being evasive but it really does depend on the application.
Hi David,
I'm using the 7/5 setting. This is much faster than 5 (# cache lines) / 7 (# bytes cache lines) or 6/6 at least for my program ;-).
Comments
I have a question with regards to reducing cache size.
The standard config looks as follows:
I want to reduce it to 4 k in the first step. Is it better to first reduce the offset-width or the index-width? To get 4k I can write:
index-width: 7
offset-width: 5
or
index-width: 6
offset-width: 6
Both result in a cache size of 4k.
Which is the preferred way to reduce the cache size or doesn't it matter which value is reduced?
Christian
I'm using the 7/5 setting. This is much faster than 5 (# cache lines) / 7 (# bytes cache lines) or 6/6 at least for my program ;-).
Christian