I don’t think you know, what you are talking about.
AmiBroker is probably the fastest technical analysis software on the market - it runs smoothly even on a calculator and for this reason if you complain about your backtesting or chart performance, there must be something seriously wrong with your code. There are always many ways of improving performance. One of such “tricks” has been already recommended to you - calculating some values only once (or when needed) and saving the outcome to Static variable(s). Besides there are many ways of running some parts of your code conditionally. You can also execute part of your formula only when new bar is added: