Programing Language: C++
Repository: https://github.com/TiagoJoseMagalhaes/cparp1
This work was developed as a part of a parallel computing class and its objective was for us to understand the importance of cache and how misses at different cache levels affected performance. This analysis was done through the traditional matrix multiplication case study, we had to implement it via the traditional 3 for way, by inverting the second and third for order and lastly via a block-based multiplication algorithm. Additionally, I tried to study the effect of data representation on these algorithms, in a sense, this was replicating the old discussion of an array of structures vs structure of arrays. One of the most interesting things that came out of this analysis for me was the hidden cost of polymorphism, I implemented the data structures via a polymorphic data structure in order to be able to easily swap out implementations, however, what I realized is that when polymorphism is used, algorithms that should have been much faster were not, my assumption to this point is that the usage of the virtual table with every data access was too intense or it was maybe even creating extra cache misses.