This takes me to the famous FizzBuzz High performance codegolf answer [1]. If we could implement optimizations like that for the inferences, maybe we could increase the speeds 10x or more.
[1] https://codegolf.stackexchange.com/questions/215216/high-thr...