Limit algorithm to 8 threads

This algorithm is memory intense and slows down significantly if using
many threads.