search for: f_memoiz

Displaying 2 results from an estimated 2 matches for "f_memoiz".

2017 Aug 17
2
High Performance containers
...designing APIs that are both easy to use, difficult to misuse, and don’t lock performance. Getting the 3 of them right (or as close as you can) is really hard work. Just to give, you an idea, here is how my hash map works if you want to do memoization ===== B f(A x); il::Map<A, B> map{}; B f_memoization(A x) { // If x is in the map, i is the slot where the key, value pair is // It it is not the case, it is the place where it should be inserted // All in all, this algo, hashes x and runs the hash table only one const int i = map.search(x); if (!map.found(x)) { map.insert(x, f(x),...
2017 Aug 17
2
High Performance containers
Hi Dean. Thanks for your reply. The ADT library is exactly what I end up replicating. My library started 2 years ago and at the beginning, what I needed was very different from LLVM. My first containers were: - A custom std::vector that does not initialize elements to 0 for int, double, etc. This is very important in HPC for the first touch policy used on NUMA architectures. It also allows