Avoiding loops in Turing

I’m not sure what might be wrong here. The speed up, which is even more dramatic on my machine, leads me to wonder if there is an error.

However, you might be able to marginalize out class and pos to obtain better performance. See this example.