Best practice is "do not interpret AST for languages with gotos".
In essence, any type of gap in a tree leads to a serious slowdown if the language processes mainly scalars. (If your language processes complex values mainly, for example, the APL of an array, that doesn't matter).
The best you can hope for is to first deal with the tree and determine where the actual addresses go to the AST, and write it in the associative cache to the side. Then, when you come across goto, just consult the cache, not look at it.
But this is the first step down the path to compilation, for example, to pre-compute what you can before you execute.
source share