Consider the following function:

```
void doMath(const std::vector<double> &v)
{
  double a = v[0];
  double b = v[1];
  double c = v[2];
  double d = v[3];
  double e = v[4];
  double f = v[5];

  //do math
}

```

If I have complex equations, often, changing the names of the variables make typing the equations much easier (e.g., avoiding typos, faster typing, more readable).

* I know the computational cost is minor, but is there **any** additional computation cost in contrast to using e.g., v[0] in operations instead of a = v[0]? For example, does the compiler know the assignment isn't necessary and optimize this during compilation?
* Does the data type make a difference? I imagine for more complex data types, yes it does (right?). For example, if the input is `std::vector<std::vector<double>>`, and I create `std::vector<double>` and reassign each element of the vector of vectors to separate vectors, would the compiler optimize this?