Performance bottleneck with large d