[var] Optimize calculate_scalar more This change alone is showing me 14% scalar in a benchmark. The reason being that the array::operator[] is not being invoked a lot of time, which was, many times, hitting the unlikely() path. Weird!