You might find yourself asking how significant the computation times will be affected when you have user defined operands in the Merit Function Editor.  This really depends upon the complexity of the computation performed within the macro, but in general the execution of a macro during optimization is extremely fast.  To demonstrate, we can optimize the Cooke Triplet twice: once using the ZPLM operand and our constructed macro, and once using the pre-programmed operand, WFNO.

For the first case, Target the ZPLM operand to be 5, and give it a Weight of 1.  You may leave the WFNO operand in place, but leave its Weight at zero.  Construct a Default Merit Function using the following settings:

Default Merit Function Dialog

Run DLS optimization.  The approximate execution time is 4 seconds:

Optimization Dialog

Undo the changes made by the optimization (press F3 to do so).  Change the Weight of the ZPLM operand to 0, set the Target of the WFNO operand to 5 and its Weight to 1.  Re-optimize. 

Optimization Dialog

The execution time with the native operand is roughly 3.6 seconds.  The difference between the two is roughly one-half-second!  As you can see, ZEMAX can still optimize very efficiently, even in cases which call user-defined macros or an externally compiled program.