On Wed, May 27, 2015 at 10:34:46AM -0600, Jeff Law wrote: > So the question here is whether or not the other uses are commonly looking > up elements we've already searched for -- that's the whole purpose of a > splay tree, to improve lookup performance for commonly hit items.
First of all, this is only used for OpenMP/OpenACC/Cilk+ constructs, so it really isn't that performance criticial. The code probably dates back to Richard's and Diego's changes. And, I believe splay trees are the right thing to use here, while sometimes you lookup different vars, looking up the same var many times in a row is very common. Jakub