Which of these two constructors is more optimal, fast-acting?

// 1 template <typename T> Matrix2x2<T>::Matrix2x2(T** m_pp) : _v2s({ m_pp[0], m_pp[1] }) {} // 2 template <typename T> Matrix2x2<T>::Matrix2x2(T** m_pp) : _v2s({ { m_pp[0][0], m_pp[0][1] }, { m_pp[1][0], m_pp[1][1] } }) {} 

Provided that Vector2<T> _v2s[2] , which has constructors:

 template <typename T> inline Vector2<T>::Vector2(T* v_p) : x(v_p[0]), y(v_p[1]) {} template <typename T> inline Vector2<T>::Vector2(T x, T y) : x(x), y(y) {} 

    1 answer 1

    There is no and cannot be any concrete answer to this question. There is no reason to believe that these designers are somehow different in speed.

    If you notice any difference - this is a feature of your compiler. Measure it yourself and act accordingly, bearing in mind that tomorrow, for no apparent reason, the situation can easily change to the opposite.