Written by

System Analyst at First Line Software
Question Flávio Lúcio Naves Júnior · Jul 15, 2024

Class methods vs MAC routines

Hello everyone,

I just want to know if there is a difference in performance between using Class methods versus MAC routines?

For example:

do Method^MyFunction()

versus

do ##class(MyFunction).Method()

Comments

Eduard Lebedyuk · Jul 15, 2024

Class methods are recommended for use in all cases.

While classes provide an overhead, this is usually negligible.

0
Yaron Munz · Jul 16, 2024

Both MAC routines and class methods are compiled to INT routines, which are then compiled to OBJ (binary) code that is executed. To achieve better performance, try to make your code compact and efficient

0