Wouldn't it become slower, the more functions you add? And exponentially slower if you start nesting those functions?
I think in this case the attention operation bounds the runtime by the longest possible sequence that can go in at once. Since you have a positional embedding, you can add arbitrarily many more functions without incurring a runtime penalty, although it may begin to interfere with the model's ability to effectively generalize as well, particularly when used with very long sequence lengths (so chains of operations, lists of ints).
Since each operation is mapped to an integer, the maximum number of tokens is bound by the precision of the system.