Title: Ask Reuben 43 - Options Short Circuit Post by: Reuben B. on August 20, 2020, 05:56:58 am If you are trying to improve the performance of a program you can use the profiler to measure what percentage of time the program spends in a function and code coverage to measure how many times a line is executed. (I should do an ask-reuben on these tools one day).
What this output might show you is functions being evaluated more often than you expect. For example with ... IF a() AND b() THEN ... is it necessary to evaluate b() if a() is FALSE, it won’t change the result of the IF. OPTIONS SHORT CIRCUIT gives you some control over wether the code should compile to evaluate the second expression or not. Read more at https://4js.com/ask-reuben/ig-43/ |