Currently, on each object, for each function lowering method, we check if the thing is a function, then we check the holder, and the name of the function, returning if the current lowering function doesn't act on it. This is pretty inefficient, just in our very limited tests it adds about .01 seconds to the run time, and there area a lot of unimplemented functions and methods. The new code is not perfect, but it uses a dispatch function to avoid some of the overhead by only doing the variant extraction once, as well as the name and holder check once.
Currently, on each object, for each function lowering method, we check if the thing is a function, then we check the holder, and the name of the function, returning if the current lowering function doesn't act on it. This is pretty inefficient, just in our very limited tests it adds about .01 seconds to the run time, and there area a lot of unimplemented functions and methods. The new code is not perfect, but it uses a dispatch function to avoid some of the overhead by only doing the variant extraction once, as well as the name and holder check once.
Fixes #87