I am working on a project where I need to pull audio vectors from a hashmap (std::map) during render. Specifically, my map uses small vectors floats as keys and large vectors of floats as values. After experiencing some serious underflow, I decided to do some benchmarks on the read times of the map. For starters, on my computer (MacBook Pro) reading 128 sequential values from the map takes about 3ms. Running the same code on the BelaMini, these reads take about 60ms.
One interesting thing I found is that if I switch the keys to single ints (so now mapping ints to vectors of floats), the run time on my computer stays the same but the time on the Mini doubles.
Perhaps I am missing something obvious but I would love some insight. Obviously the PocketBeagle does not have the same cache capabilities as a laptop but a 3ms to 60ms jump for 128 reads seems pretty crazy.
One more note - I know that std::map is not the fastest hashmap but I figured I should figure out what's going on here before auditioning others.
Any help is appreciated!