Performance of Lerp vs simple math

There seems to be discussion that lerping textures is generally expensive.
Would the simple math here (2 multiplies, a one minus, and an add) be preferable to a lerp ?

The example below is simple, but this is question would more be for a material with lots of textures that would blend using one of the methods

In a more complex case, I don’t think you have any choice, you have to use a lerp…

Lerp is useful for blending between two textures using an alpha, it is more than just a simple merging function. For instance, you could use a single Lerp node to lightly create rust on a metal object, whereas you would probably need more nodes to produce the same result with the simple maths method.

As your object and materials get more complex it becomes less feasible to use the simple maths method to combine textures together.

It is very easy to turn what I did into a function that UX looks same as the lerp; you turn that multiply add one minus into a single function with 2 inputs and an alpha. To the user it look the same.

That is why I’m asking about only about the performance of that math vs lerp. The blend would be different but for many things not noticeable

I think a Lerp node would suffice if you are going to need that many nodes in a function to replace it anyways. I don’t think Lerp nodes are that costly, you could probably save more memory and performance through other areas such as combining textures in Photoshop beforehand or by assigning multiple simple and reusable materials to various parts of the mesh (as opposed to one single complex material).

That’s how the lerp node should work under the hood
(Formula source: lerp)
So your version is actually a little bit more expensive since it’s using more multiplications.