Actually that's not the case for a naive:

```C++
DDAxes
DDAxesNames::index2(const std::string & s)
{
  for (size_t i = 0; i < 7; ++i)
  {
    if (s == axesNames[i].label)
      return DDAxes(i);
  }
  return undefined;
//  return keyToValue(s.c_str(), axesNames);
}
```

which is roughly ~20% slower than the recursive version on my machine, in a very limited tests (a loop for on to find the index of something passed on command line, to avoid complete constexpr folding).

When I was looking into this, a while ago, I was systematically getting speed improvements (even one order of magnitude, depending on the code), because the compiler happily inlines and simplifies a lot of the code. This is of course not counting the case in which you do index("x") and the compiler happily inlines the corresponding enum value.

Moreover, since it's tail-recursive constexpr (i.e. the compiler knows it's only one statement, and that the tail of the recursion is final), the slowdown usually associated to pushing and popping stack frames is not actually there.

BTW, a `std::map` lookup was always worse as well, in my past tests.

In case this is actually a performance issue, and if you have any better implementation for the lookup, I'm happy to update my pull request.