Take a look here.
Evidently, the reward infos are stores in a B-Tree map which is in short an ordered map based on a B-Tree.
B-Trees represent a fundamental compromise between cache-efficiency and actually minimizing the amount of work performed in a search. In theory, a binary search tree (BST) is the optimal choice for a sorted map, as a perfectly balanced BST performs the theoretical minimum amount of comparisons necessary to find an element (log2n).
Non-optimized method of finding elements.
Consider using binary search trees instead.
