Peer Review
I tested both the hosted and the mips version of your code and both works correctly producing the expected result, I think your project looks good enough to not really mention anything to modify, so Instead here are two nice things that I noticed:
- The fact that base Rust actually has a ".count_zeros()", I did not know that, I personally counted all the one's in the seed and then had to subtract the number of one's that I got against 32 to get my count of zeroes.
-
let plain: &mut [u8] = unsafe{&mut PLAIN}; //muteable refrence to PLAIN
I thought this was a pretty good idea to only use theunsafe
area for the very specific part, I personally used theunsafe
for the majority of my main function, but I think you did it way better by actually only placing memory that will be modified into the unsafe area. (I belive that is good practice to follow).
Questions section of the lab:
I also did test it and saw that I also did get 8789 cycles before it going to the infinite loop. I personally think you have written down some of the biggest differences between the Rust compilor and the hand written code, something else of note is that the Rust compiler (almost) never uses the stack, it only ever uses the registers $1-$19
which at least I though was interesting '-' , but that might have been your comment about -it does not use the frame pointer at all.
and if it is, you probably should consider wording it slightly differently.
Overall good work, I will close this issue once I know that you have seen it.