I would like to record for posterity the fact that the two benchmark behave very differently if we don't have + sum here.  Maybe something like

const bool kTriggerDeadCodeElimination = false;

and then:

(*result)[k] = ... + (kTriggerDeadCodeElimination ? 0 : sum);

Of course, you'll need to check that switching this boolean has the right effect.