Improved performance in ndsdpvar