Assignment3: SoftCPU
contributed by <huang-me
>
Workflow
Since I found that compiler will calculate the result while compiling if optimization level is set to -O3, so all testing in this homework is compare under -O2 level.
Original solution
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Most of the branch predict failed in for loop.
Optimization
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
I use loop unrolling to decrease the amount of branch predict, and make the cycle decrease for 18 cycles.