What's the benefit of metal function pointers (focusing on visible functions rather than intersection functions), when the same functionality can be achieved without these newer features?
For the same functionality, in place of every index of the function table, have an external function. In place of every indexing into the tableT[i], have a switch statement that matches i to the corresponding external function.
- For the case of visible functions statically linked, instead of using the
functionsarray oflinkedFunctions, use theprivatefunctions array. - For the case of visible functions dynamically linked, instead of using the
binaryFunctionsarray oflinkedFunctions, use functions from a dynamic library.