Improve the performance of score calculation, especially for the 'window' profile.

Scoring runs a regression for each of 2500 bootstrap resamples per test, and each
resample was sorted twice.

- In _windowedFit(), keep running sums over the window rather than recomputing the
  averages for every sample, and stop the scan for bestIndex early.
- Since bootstrap resamples arrive already sorted by complexity, _windowedFit() now
  only sorts runs of equal complexity by time, falling back to a full sort otherwise.
- Sort each bootstrap resample with a stable counting sort on precomputed complexity
  ranks, instead of a comparison sort.

Results are unchanged. Scoring the unit test data with the window profile goes from
about 1060ms to 640ms; slope and flat get about 25% faster.
2 files changed
tree: 7d0e79773603f18ffbe15e0d3e46951b8a6291da
  1. MotionMark/
  2. .gitignore
  3. Governance.md
  4. index.html
  5. LICENSE
  6. README.md
README.md

MotionMark

MotionMark is a graphics benchmark to measure the performance of graphics operations on the web.