Each implementation was run 30 times for vector sizes n = 220, 224, and 230, and the average execution time was calculated. This includes a C version and an x86-64 assembly language version.
dot_prod_c(...)
n | ave time |
---|---|
220 | 0.003267 sec |
224 | 0.051800 sec |
230 | 64.089600 sec |
dot_prod_asm(...)
n | ave time |
---|---|
220 | 0.000967 sec |
224 | 0.015400 sec |
230 | 62.540967 sec |
The x86-64 implementation had a lower average execution time than the C implementation for the dot product operation. This suggest that the x86-64 runs faster than the C implementation.
✔ produces the same results
NOTE: displayed times are an average from 30 consecutive runs
dot_prod_c(...)
n | ave time |
---|---|
220 | 0.000933 sec |
224 | 0.014800 sec |
230 | 66.016167 sec |
dot_prod_asm(...)
n | ave time |
---|---|
220 | 0.000933 sec |
224 | 0.014533 sec |
230 | 64.533533 sec |
Similar to the trials performed in debug mode, the x86-64 implementation once again had a lower average execution time than the C implementation for the dot product operation. This further supports the idea that the x86-64 implementation is a better performing one.
✔ produces the same results