message: tools: Update codecbench to show best results
  This makes it easier to plot this when comparing different
  architectures/compilers/etc.
diff: @@ -53,7 +53,7 @@ uint32_t murmur3(uint32_t h)
  return h;
  }
  -void benchCodecs(const std::vector<Vertex>& vertices, const std::vector<unsigned int>& indices)
  +void benchCodecs(const std::vector<Vertex>& vertices, const std::vector<unsigned int>& indices, double& bestvd, double& bestid)
  {
  std::vector<Vertex> vb(vertices.size());
  std::vector<unsigned int> ib(indices.size());
  @@ -101,11 +101,17 @@ void benchCodecs(const std::vector<Vertex>& vertices, const std::vector<unsigned
  printf("decode: vertex %.2f ms (%.2f GB/sec), index %.2f ms (%.2f GB/sec)\n",
  (t1 - t0) * 1000, double(vertices.size() * sizeof(Vertex)) / GB / (t1 - t0),
  (t2 - t1) * 1000, double(indices.size() * 4) / GB / (t2 - t1));
  +
  + if (pass == 0)
  + {
  + bestvd = std::max(bestvd, double(vertices.size() * sizeof(Vertex)) / GB / (t1 - t0));
  + bestid = std::max(bestid, double(indices.size() * 4) / GB / (t2 - t1));
  + }
  }
  }
  }
  -void benchFilters(size_t count)
  +void benchFilters(size_t count, double& besto8, double& besto12, double& bestq12, double& bestexp)
  {
  // note: the filters are branchless so we just run them on runs of zeroes
  size_t count4 = (count + 3) & ~3;
  @@ -141,6 +147,11 @@ void benchFilters(size_t count)
  (t2 - t1) * 1000, double(d8.size()) / GB / (t2 - t1),
  (t3 - t2) * 1000, double(d8.size()) / GB / (t3 - t2),
  (t4 - t3) * 1000, double(d8.size()) / GB / (t4 - t3));
  +
  + besto8 = std::max(besto8, double(d4.size()) / GB / (t1 - t0));
  + besto12 = std::max(besto12, double(d8.size()) / GB / (t2 - t1));
  + bestq12 = std::max(bestq12,double(d8.size()) / GB / (t3 - t2));
  + bestexp = std::max(bestexp, double(d8.size()) / GB / (t4 - t3));
  }
  }
  @@ -189,6 +200,13 @@ int main()
  }
  }
  - benchCodecs(vertices, indices);
  - benchFilters(8 * N * N);
  + double bestvd = 0, bestid = 0;
  + benchCodecs(vertices, indices, bestvd, bestid);
  +
  + double besto8 = 0, besto12 = 0, bestq12 = 0, bestexp = 0;
  + benchFilters(8 * N * N, besto8, besto12, bestq12, bestexp);
  +
  + printf("Algorithm : vtxdec\tidxdec\toct8\toct12\tquat12\texp\n");
  + printf("Score (GB/s): %.2f\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\n",
  + bestvd, bestid, besto8, besto12, bestq12, bestexp);
  }
  