Is reuse material function optimize?

I know than material instance don’t optimise, it’s just easier way to manage materials, but concerning material function, if I reuse the same material function in many material I do optmization?
My material function is calculated one time then send to all materials, or recalculated each time in each material?


It just makes things neater, it doesn’t optimize.

The function needs to be calculated separately for each material.