Is reuse material function optimize?

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


It’s not an optimization, it’s like a macro, it just gets replaced by material code.

So there is no way to optimize by sharing code between materials, materials are totally independent of each other ?

The mains two ways are material instances and material parameter collections.

But they are not an optimization, just a convenience.

They save a lot of filesize (i think)