This project Isn't a lot more than a simple experiment on C++ optimizations on a basic array. I'm publishing the code for anyone to check it out and try it out if they wish.
Good materials on this topic:
- Compiler
- GCC Optimization Options: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
- Clang/LLVM Optimization Remarks: https://clang.llvm.org/docs/UsersManual.html#optimization-remarks
- Caching
- https://www.geeksforgeeks.org/lru-cache-implementation/ <- didn't need an implementation like that here though
- https://en.cppreference.com/w/cpp/container/unordered_map
- https://youtu.be/KiB0vRi2wlc?si=HoLqJ37pwDIyN3OU&t=762 <- manual hash table implementation Comment: Although hash tables aren't really only used for caching, they're really useful for storing data with keys LRU caching is more practical in real world apps since you define a cache size (Last Recently Used). For this case we needed to look up keys (n) and they respective values.
- AVX/SSE
Looking for materials on this topic, this is the new thing for me and the reason I made this project.
- Here's the video which inspired the testing project as a whole -> https://www.youtube.com/watch?v=WLwTlC1R2sY&t=0s
- https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions (AVX = 256bit, SSE = 128bit registers)