Improved k-metric computation