computeGridPerformance function

Computes grid performance with a specified performance function