The LUA scripts is that they are only available in M codes. In other words, you can't embed LUA script in the G code directly. Otherwise, LUA is certainly fast. Both Macro B and LUA scripted M code will break the CV chain, so the move right before them will be an exact stop move.
With Macro B, one can write a subroutine and associate the sub with a G code. Say your sub is called 9099 and it is written to take the IJK values. You can then associate that sub with say G103 and call it in the program like G103 I_ J_ K_.
You could also call the sub with G65. Like G65 P9099 I_ J_ K_.
So it is about up to the way you want to do it. The M codes CAN take parameters too. But probably the M code would do the calculation in LUA and then stuff the output into some #var range that you define. Then you would need to write the G code to handle the movement that uses those #vars.
But it would be far easier to write a sub that calculates the desired values and moves the head/table all in G code. I would prefer Macro B. But... it does come at a cost.
Steve