some squarepack performance improvements