The type level division operation I implemented might be a big bottleneck because it is not purely primitive recursive. However, I think type calculations like these are supposed to be slow, for instance this ( https://blog.mattbierner.com/stupid-template-tricks-the-life-comonadic/ ) c++ implementation of Game of Life has no realistic compilation time after 4 generations on a 11x11 array.