Closed bzbarsky closed 5 years ago
Similar to #4, this was also fairly speculative. I'd welcome thoughts on other, more efficient ways to expose this capability; can you think of any?
Again, this is a matter of tradeoffs. You either need to have extra data structures for finding the bits you want quickly (more memory) or you need to cache found bits (more memory) or you end up with a linear scan.
It's not 100% clear what the right tradeoffs will be in all circumstances.
The hard part is the "existing abilities to find an [sic] execute the backing algorithm behind a given static method".
Again, this can easily end up O(N) in number of methods on the object; it certainly is in Gecko. All the consumers perform aggressive caching of the actual method object involved, but this API has no provisions for being able to do that on the caller side.