Page MenuHomePhabricator

Benchmarks
Updated 773 Days AgoPublic

This is for Goldilocks 2.0. If you're using Goldilocks 1.0 (part of PawLIB), see the official documentation at https://docs.mousepawmedia.com/pawlib

Vocabulary

measurement: a single call to Test::run_optimized() from within the function that measures CPU cycles.

Benchmark Modes

Every Benchmark consists of tests A and B. In a standard benchmark, test B would be whatever test was registered as the comparative of test A.

There are three Benchmark Modes.

Mama Bear

This is the "Cold Cache" mode. One measurement is taken of A, one of B, alternating until n measurements have been taken from each. This prevents instruction cache warming from occurring.

NOTE: We may be able to amplify this by reading data into L1 and L2 cache between each call. See How to Clear CPU L1 and L2 Cache and Memory part 2: CPU caches

Papa Bear

This is the "Hot Cache" mode. All n measurements are taken for A before the measurements for B are taken. This ensures maximum possible cache warming.

Baby Bear

This is the "Just Right Cache" mode. It allows some cache warming to take place naturally. Eight measurements are taken from A, and eight from B, alternating until n measurements have been taken from each.

NOTE: Why eight? This was selected arbitrarily; perhaps we should use a sequence instead: 1 measurement, 2 measurements, 3, 4, 5... until n measurements have been taken.
Last Author
jcmcdonald
Last Edited
Jul 2 2020, 5:43 PM