By other here do you mean ones that are not at the top
I know I am a monorepo lover and hater of submodules but I might like to see this in a separate repo that includes Stan Math as a submodule? Just so it’s easy to run the same performance test on multiple versions of the Stan Math code. When I was doing some of the other performance tests I originally had them in the same repo but it became too difficult to manage testing different commits if the test itself could change between commits. I might add a Google Benchmark-ified version to https://github.com/seantalts/perf-math if that’s okay? I might also try with the Chandler tricks above instead of the volatile and see if that makes a difference.