int (int expectedOnMyMachine, long thisTiming, long referenceTiming, boolean useLegacyScaling) { if (useLegacyScaling) { double speed = 1.0 * thisTiming / referenceTiming; double delta = speed < 1 ? 0.9 + Math.pow(speed - 0.7, 2) : 0.45 + Math.pow(speed - 0.25, 2); expectedOnMyMachine *= delta; return expectedOnMyMachine; } else { return (int)(expectedOnMyMachine * thisTiming / referenceTiming); } }