Function call optimizers

Hi there! I dont understand how custom optimizers work. Do they run only in runtime or maybe they are used for translation to C-code and compiling? How does PHP understand that it must use optimized calls instead of functions from core?

They run during compile time and therefor lead to different generated C-code. They for example call the underlying implementation of a function insteadof calling it through the PHP userland. (->reduced overhead)