Optimizing Mips for cache misses

I am trying to optimize / fix sieve of Eratosthenes algorithm to minimize cache misses. currently I have stopped most of them but I am having trouble on a specific loop. For some reason on the save word command it gets a cache miss, I have tried changing to store byte but that creates interesting results, I guess I am having some trouble figuring out why its causing the miss so its making it difficult to fix it.

inner:  add $t2, $s2, 0 # save the bottom of stack address to $t2
sll $t3, $t1, 2 # calculate the number of bytes to jump over
sub $t2, $t2, $t3   # subtract them from bottom of stack address
add $t2, $t2, 8 # add 2 words - we started counting at 2!

sw  $s0, 0($t2) # store 0's -> it's not a prime number!

add $t1, $t1, $t0   # do this for every multiple of $t0

Full code can be found here http://www.marcell-dietl.de/downloads/eratosthenes.s

Answers


Need Your Help

How to login and redirect through HttpClient in java

java redirect login httpclient

Though there are multiple such questions, infact the various answers confused me.....I am using HttpClient 4.X.X

Popup with StaysOpen to false is not closing

c# wpf .net-3.5

I have a telerik grid view and when I right click the header, I'm showing a with a ListBox inside containing the list of columns.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.