function runPerfTest(byteLength, updateCount) {
    var label =
        (hashName + ': ' + updateCount + ' update(s) of ' + byteLength +
         ' bytes');

    function run(data, dataType) {
      table.run(function() {
        'use strict';
        var hash = hashFactory();
        for (var i = 0; i < updateCount; i++) {
          hash.update(data, byteLength);
        }
        // Prevent JsCompiler optimizations from invalidating the benchmark.
        goog.reflect.sinkValue(hash.digest());
      }, label + ' (' + dataType + ')');
    }

    var byteArray = goog.crypt.hashTester.createRandomByteArray_(byteLength);
    var byteString = goog.crypt.hashTester.createByteString_(byteArray);

    run(byteArray, 'byte array');
    run(byteString, 'byte string');
  }
Runs performance tests.

@param {function():!goog.crypt.Hash} hashFactory A hash factory.
@param {string} hashName Name of the hashing function.